diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2011-04-19 15:44:55 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2011-04-19 15:44:55 +0200 |
commit | 06b605171f1c9d8b42bd3326a243b8b03d2e4e58 (patch) | |
tree | e96c135042999136bf0e75d113aae306e51983e3 /lisp/ielm.el | |
parent | 04c569546ad52f6270d8fc6d4aa0750950a0ac05 (diff) | |
download | emacs-06b605171f1c9d8b42bd3326a243b8b03d2e4e58.tar.gz |
lisp/*.el: Lexical-binding cleanup.
Diffstat (limited to 'lisp/ielm.el')
-rw-r--r-- | lisp/ielm.el | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lisp/ielm.el b/lisp/ielm.el index a1057303743..c445e647878 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -282,7 +282,7 @@ simply inserts a newline." (defvar ielm-input) -(defun ielm-input-sender (proc input) +(defun ielm-input-sender (_proc input) ;; Just sets the variable ielm-input, which is in the scope of ;; `ielm-send-input's call. (setq ielm-input input)) @@ -303,8 +303,17 @@ simply inserts a newline." ;;; Evaluation -(defun ielm-eval-input (ielm-string) - "Evaluate the Lisp expression IELM-STRING, and pretty-print the result." +(defvar ielm-string) +(defvar ielm-form) +(defvar ielm-pos) +(defvar ielm-result) +(defvar ielm-error-type) +(defvar ielm-output) +(defvar ielm-wbuf) +(defvar ielm-pmark) + +(defun ielm-eval-input (input-string) + "Evaluate the Lisp expression INPUT-STRING, and pretty-print the result." ;; This is the function that actually `sends' the input to the ;; `inferior Lisp process'. All comint-send-input does is works out ;; what that input is. What this function does is evaluates that @@ -317,7 +326,8 @@ simply inserts a newline." ;; ;; NOTE: all temporary variables in this function will be in scope ;; during the eval, and so need to have non-clashing names. - (let (ielm-form ; form to evaluate + (let ((ielm-string input-string) ; input expression, as a string + ielm-form ; form to evaluate ielm-pos ; End posn of parse in string ielm-result ; Result, or error message ielm-error-type ; string, nil if no error @@ -395,7 +405,7 @@ simply inserts a newline." (goto-char ielm-pmark) (unless ielm-error-type - (condition-case err + (condition-case nil ;; Self-referential objects cause loops in the printer, so ;; trap quits here. May as well do errors, too (setq ielm-output (concat ielm-output (pp-to-string ielm-result))) |