Commit bc43b8e8 authored by Karl Heuer's avatar Karl Heuer
Browse files

(eval-expression): No longer disabled, since M-: isn't

as likely to be typed by mistake as the old ESC ESC binding was.
Arg `expression' renamed to `eval-expression-arg' to avoid
potential collision if its value mentions `expression'.
parent f655106b
......@@ -470,20 +470,18 @@ Other major modes are defined by comparison with this one."
"Minibuffer keymap used for reading Lisp expressions.")
(define-key read-expression-map "\M-\t" 'lisp-complete-symbol)
(put 'eval-expression 'disabled t)
(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)
(defun eval-expression (eval-expression-arg)
"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
'read-expression-history)))
(setq values (cons (eval expression) values))
(setq values (cons (eval eval-expression-arg) values))
(prin1 (car values) t))
(defun edit-and-eval-command (prompt command)
......
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