Commit 8570b0ca authored by Roland McGrath's avatar Roland McGrath
Browse files

(read-expression-history): New defvar.

(eval-expression): Use it has history var in interactive spec.
parent 934d56b7
......@@ -375,13 +375,16 @@ Other major modes are defined by comparison with this one."
(put 'eval-expression 'disabled t)
;; We define this, rather than making eval interactive,
(defvar read-expression-history nil)
;; We define this, rather than making `eval' interactive,
;; for the sake of completion of names like eval-region, eval-current-buffer.
(defun eval-expression (expression)
"Evaluate EXPRESSION and print value in minibuffer.
Value is also consed on to front of the variable `values'."
(interactive (list (read-from-minibuffer "Eval: "
nil read-expression-map t)))
nil read-expression-map t
'read-expression-history)))
(setq values (cons (eval expression) values))
(prin1 (car values) t))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment