(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))
;;; 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
;;
;; 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
(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)))