From 48439f8844f6d54fbb958f074f985c130be7989c Mon Sep 17 00:00:00 2001 From: René Neumann Date: Fri, 12 Aug 2011 14:04:14 +0200 Subject: Enhance IE script --- .zsh/functions/IE | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to '.zsh') 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 -- cgit v1.2.3-54-g00ecf