1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

(read-expression-history): New defvar.

(eval-expression): Use it has history var in interactive spec.
This commit is contained in:
Roland McGrath 1993-07-26 18:32:07 +00:00
parent 934d56b7f1
commit 8570b0ca3c

View File

@ -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))