lisp/*.el: Lexical-binding cleanup.
[bpt/emacs.git] / lisp / ielm.el
index a105730..c445e64 100644 (file)
@@ -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)))