lib/scripts/isa-emacs
author paulson
Thu, 05 Jun 1997 13:22:25 +0200
changeset 3403 6cc663f6d62e
parent 3311 36e3de24137d
child 4928 c17493ccfd54
permissions -rwxr-xr-x
A slight simplification of optstring The new "simpset" keyword in the "recdef" declaration
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3007
e5efa177ee0c removed -norc;
wenzelm
parents: 2968
diff changeset
     1
#!/bin/bash
2305
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
     2
#
2312
65ea8bbb4e02 *** empty log message ***
wenzelm
parents: 2305
diff changeset
     3
# $Id$
65ea8bbb4e02 *** empty log message ***
wenzelm
parents: 2305
diff changeset
     4
#
3304
08952002358d adapted to Isamode 2.6;
wenzelm
parents: 3007
diff changeset
     5
# Emacs Isamode interface wrapper.
2305
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
     6
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
     7
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
     8
## diagnostics
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
     9
2939
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    10
PRG=$(basename $0)
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    11
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    12
function usage()
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    13
{
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    14
  echo
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    15
  echo "Usage: $PRG [OPTIONS]"
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    16
  echo
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    17
  echo "  Options are:"
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    18
  echo "    -g GEOM      main window geometry (default 80x20)"
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    19
  echo
3304
08952002358d adapted to Isamode 2.6;
wenzelm
parents: 3007
diff changeset
    20
  echo "  Starts Emacs and Isamode."
2939
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    21
  echo
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    22
  exit 1
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    23
}
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    24
2305
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
    25
function fail()
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
    26
{
2344
c3e1eaea4418 added -norc option;
wenzelm
parents: 2312
diff changeset
    27
  echo "$1" >&2
2305
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
    28
  exit 2
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
    29
}
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
    30
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
    31
2939
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    32
## process command line
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    33
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    34
# options
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    35
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    36
MAINGEOM="80x20"
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    37
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    38
while getopts "g:" OPT
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    39
do
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    40
  case "$OPT" in
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    41
    g)
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    42
      MAINGEOM="$OPTARG"
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    43
      ;;
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    44
    \?)
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    45
      usage
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    46
      ;;
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    47
  esac
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    48
done
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    49
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    50
shift $(($OPTIND - 1))
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    51
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    52
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    53
# args
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    54
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    55
[ $# != 0 ] && usage
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    56
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    57
2305
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
    58
## main
35f78d6c4faa Emacs / Isamode interface.
wenzelm
parents:
diff changeset
    59
3304
08952002358d adapted to Isamode 2.6;
wenzelm
parents: 3007
diff changeset
    60
CMDS="-l $ISAMODE_HOME/elisp/isa-site.el"
2939
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    61
3304
08952002358d adapted to Isamode 2.6;
wenzelm
parents: 3007
diff changeset
    62
for FILE in "$ISABELLE_HOME/etc/isa-settings.el" \
08952002358d adapted to Isamode 2.6;
wenzelm
parents: 3007
diff changeset
    63
    "$ISABELLE_HOME_USER/etc/isa-settings.el"
08952002358d adapted to Isamode 2.6;
wenzelm
parents: 3007
diff changeset
    64
do
08952002358d adapted to Isamode 2.6;
wenzelm
parents: 3007
diff changeset
    65
  [ -f "$FILE" ] && CMDS="$CMDS -l $FILE"
08952002358d adapted to Isamode 2.6;
wenzelm
parents: 3007
diff changeset
    66
done
2939
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    67
3304
08952002358d adapted to Isamode 2.6;
wenzelm
parents: 3007
diff changeset
    68
CMDS="$CMDS -f isabelle"
2939
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    69
73837efaf71b misc improvement;
wenzelm
parents: 2600
diff changeset
    70
3311
36e3de24137d exec the emacs;
wenzelm
parents: 3304
diff changeset
    71
exec $ISAMODE_EMACS -T "Isabelle" -geometry $MAINGEOM $CMDS