diff options
author | Akira TAGOH <akira@tagoh.org> | 2006-03-21 10:19:24 +0000 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2006-03-21 10:19:24 +0000 |
commit | 95d938358a4688d4e169cbb6e9f903ecef76c3ff (patch) | |
tree | a176b4bc1c341467dc701ab4f6c6950bbfc7efcd /lib | |
parent | a0c4ea09653df8275fee98f18c789e882be5118b (diff) |
(..statementedit): defined.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hg_init.ps | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/lib/hg_init.ps b/lib/hg_init.ps index b2c2391..a4f45a6 100644 --- a/lib/hg_init.ps +++ b/lib/hg_init.ps @@ -69,6 +69,15 @@ true .setglobal (>) .concatstring exch pop } bind def +systemdict /.statementedit known { + /..statementedit { + .promptmsg null exch .statementedit exch pop + } bind def +} { + /..statementedit { + prompt (%statementedit) (r) file + } bind def +} ifelse %%% %%% Level 1 operators @@ -84,18 +93,7 @@ true .setglobal /executive { { { - { - systemdict /.statementedit known { - % this is a workaround to get libedit working - % with keep the prompt during deletion of the previous character. - - % stacking null is actually meaningless. - % but it needs to keep the same depth of stack with (%statementedit) stuff. - .promptmsg null exch .statementedit exch pop - } { - prompt (%statementedit) (r) file - } ifelse - } stopped { + {..statementedit} stopped { % need to detect an empty line separately to take care of /undefinedfilename. $error /newerror get { $error /errorname get /undefinedfilename eq { @@ -106,9 +104,7 @@ true .setglobal } ifelse } if } if - dup type /filetype eq { - cvx exec - } if + dup type /filetype eq {cvx exec} if } stopped { $error /newerror get { errordict /handleerror get exec @@ -138,9 +134,7 @@ true .setglobal /putinterval cvx errordict /rangecheck get exec } if - { - 2 index 2 index 3 -1 roll put 1 add - } forall + {2 index 2 index 3 -1 roll put 1 add} forall pop pop } bind def % stack - |