mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-30 08:09:04 +00:00
(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'.
This commit is contained in:
parent
f655106be2
commit
bc43b8e83a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user