1998-08-19 Karl M. Hegbloom <karlheg(a)bittersweet.inetarena.com>
* ielm.el (ielm-eval-input): Change `:', `::', `:::' to `!'...,
since the `:' is special syntax now for keyword variables.
(several other occurances also changed.) I chose !, because shells
use that character for history expansion.
(ielm-eval-input): Check that `ielm-string' is not null.
Integrated reversed patch from Gregory Neil Shapiro
<gshapiro(a)sendmail.org>.
Index: ielm.el
===================================================================
RCS file: /usr/local/cvsroot/xemacs-packages/libs/xemacs-devel/ielm.el,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 ielm.el
--- ielm.el 1998/01/14 06:32:32 1.1.1.1
+++ ielm.el 1998/08/19 07:57:48
@@ -283,7 +283,8 @@
(ielm-output "") ; result to display
(ielm-wbuf ielm-working-buffer) ; current buffer after evaluation
(ielm-pmark (ielm-pm)))
- (if (not (ielm-is-whitespace ielm-string))
+ (if (and (not (null ielm-string))
+ (not (ielm-is-whitespace ielm-string)))
(progn
(condition-case err
(let (rout)
@@ -301,15 +302,15 @@
(if (ielm-is-whitespace (substring ielm-string ielm-pos))
;; need this awful let convolution to work around
;; an Emacs bug involving local vbls and let binding
- (let ((:save :)
- (::save ::)
- (:::save :::))
+ (let ((!save !)
+ (!!save !!)
+ (!!!save !!!))
(save-excursion
(set-buffer ielm-working-buffer)
(condition-case err
- (let ((: :save)
- (:: ::save)
- (::: :::save)
+ (let ((! !save)
+ (!! !!save)
+ (!!! !!!save)
(ielm-obuf (current-buffer)))
(setq ielm-result (eval ielm-form))
(setq ielm-wbuf (current-buffer))
@@ -345,12 +346,13 @@
(if ielm-noisy (ding))
(setq ielm-output (concat ielm-output "*** " ielm-error-type " ***
"))
(setq ielm-output (concat ielm-output ielm-result)))
- ;; There was no error, so shift the ::: values
- (setq ::: ::)
- (setq :: :)
- (setq : ielm-result))
+ ;; There was no error, so shift the !!! values
+ (setq !!! !!)
+ (setq !! !)
+ (setq ! ielm-result))
(setq ielm-output (concat ielm-output "\n"))))
- (setq ielm-output (concat ielm-output ielm-prompt))
+ (if (not (null ielm-string))
+ (setq ielm-output (concat ielm-output ielm-prompt)))
(comint-output-filter (ielm-process) ielm-output)))
;;; Process and marker utilities
@@ -386,7 +388,7 @@
* \\[comint-dynamic-complete] completes Lisp symbols (or filenames, within strings),
or indents the line if there is nothing to complete.
-During evaluations, the values of the variables `:', `::', and `:::'
+During evaluations, the values of the variables `!', `!!', and `!!!'
are the results of the previous, second previous and third previous
evaluations respectively.
@@ -436,17 +438,17 @@
(setq fill-paragraph-function 'lisp-fill-paragraph)
;; Value holders
- (setq : nil)
- (make-local-variable ':)
- (setq :: nil)
- (make-local-variable '::)
- (setq ::: nil)
- (make-local-variable ':::)
+ (setq ! nil)
+ (make-local-variable '!)
+ (setq !! nil)
+ (make-local-variable '!!)
+ (setq !!! nil)
+ (make-local-variable '!!!)
;; font-lock support
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults
- '(ielm-font-lock-keywords nil nil ((?: . "w") (?- . "w") (?* .
"w"))))
+ '(ielm-font-lock-keywords nil nil ((?! . "w") (?- . "w") (?* .
"w"))))
;; A dummy process to keep comint happy. It will never get any input
(if (comint-check-proc (current-buffer)) nil