3007
|
1 |
#!/bin/bash
|
2305
|
2 |
#
|
2312
|
3 |
# $Id$
|
|
4 |
#
|
3304
|
5 |
# Emacs Isamode interface wrapper.
|
2305
|
6 |
|
|
7 |
|
|
8 |
## diagnostics
|
|
9 |
|
2939
|
10 |
PRG=$(basename $0)
|
|
11 |
|
|
12 |
function usage()
|
|
13 |
{
|
|
14 |
echo
|
|
15 |
echo "Usage: $PRG [OPTIONS]"
|
|
16 |
echo
|
|
17 |
echo " Options are:"
|
|
18 |
echo " -g GEOM main window geometry (default 80x20)"
|
|
19 |
echo
|
3304
|
20 |
echo " Starts Emacs and Isamode."
|
2939
|
21 |
echo
|
|
22 |
exit 1
|
|
23 |
}
|
|
24 |
|
2305
|
25 |
function fail()
|
|
26 |
{
|
2344
|
27 |
echo "$1" >&2
|
2305
|
28 |
exit 2
|
|
29 |
}
|
|
30 |
|
|
31 |
|
2939
|
32 |
## process command line
|
|
33 |
|
|
34 |
# options
|
|
35 |
|
|
36 |
MAINGEOM="80x20"
|
|
37 |
|
|
38 |
while getopts "g:" OPT
|
|
39 |
do
|
|
40 |
case "$OPT" in
|
|
41 |
g)
|
|
42 |
MAINGEOM="$OPTARG"
|
|
43 |
;;
|
|
44 |
\?)
|
|
45 |
usage
|
|
46 |
;;
|
|
47 |
esac
|
|
48 |
done
|
|
49 |
|
|
50 |
shift $(($OPTIND - 1))
|
|
51 |
|
|
52 |
|
|
53 |
# args
|
|
54 |
|
|
55 |
[ $# != 0 ] && usage
|
|
56 |
|
|
57 |
|
2305
|
58 |
## main
|
|
59 |
|
3304
|
60 |
CMDS="-l $ISAMODE_HOME/elisp/isa-site.el"
|
2939
|
61 |
|
3304
|
62 |
for FILE in "$ISABELLE_HOME/etc/isa-settings.el" \
|
|
63 |
"$ISABELLE_HOME_USER/etc/isa-settings.el"
|
|
64 |
do
|
|
65 |
[ -f "$FILE" ] && CMDS="$CMDS -l $FILE"
|
|
66 |
done
|
2939
|
67 |
|
3304
|
68 |
CMDS="$CMDS -f isabelle"
|
2939
|
69 |
|
|
70 |
|
3311
|
71 |
exec $ISAMODE_EMACS -T "Isabelle" -geometry $MAINGEOM $CMDS
|