summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zsh/functions/IE13
1 files changed, 7 insertions, 6 deletions
diff --git a/.zsh/functions/IE b/.zsh/functions/IE
index 1c40f45..d7832fd 100644
--- a/.zsh/functions/IE
+++ b/.zsh/functions/IE
@@ -1,5 +1,6 @@
# default arguments to isabelle emacs
-local defargs="-x true -m iff"
+readonly defargs="-x true -m iff"
+readonly default="HOL"
local file logic
# safety check to avoid failing later on
@@ -24,8 +25,8 @@ esac
# have a .isabelle-logic file that contains a logic-image pattern
# if it contains "..", the parent directory is searched
if [[ -z $logic && -e .isabelle-logic ]]; then
- local line p=.isabelle-logic
- line=$(head -1 $p)
+ local p=.isabelle-logic
+ local line=$(head -1 $p)
while [[ $line == .. ]]; do
p=../$p
@@ -62,13 +63,13 @@ if [[ -n $logic && $logic != "HOL" ]]; then
fi
fi
-# fall-through if not logic could be determined
+# fall-through if no logic could be determined
if [[ -z $logic ]]; then
- logic="HOL"
+ logic=$default
echo "Defaulting to '$logic'."
fi
# AAAAND ... FIRE!
-isabelle emacs ${=defargs} -l $logic $file "$@"
+isabelle emacs ${=defargs} "$@" -l $logic $file
# vim: ft=zsh