mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
(eval-expression, edit-and-eval-command): Let
minibuffer-history-sexp-flag be 't during the call to read-from-minibuffer.
This commit is contained in:
parent
4579dd4297
commit
adca5fa6cc
1 changed files with 10 additions and 12 deletions
|
|
@ -382,9 +382,11 @@ Other major modes are defined by comparison with this one."
|
|||
(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
|
||||
'read-expression-history)))
|
||||
(interactive
|
||||
(let* ((minibuffer-history-sexp-flag t))
|
||||
(list (read-from-minibuffer "Eval: "
|
||||
nil read-expression-map t
|
||||
'read-expression-history)))
|
||||
(setq values (cons (eval expression) values))
|
||||
(prin1 (car values) t))
|
||||
|
||||
|
|
@ -392,15 +394,11 @@ Value is also consed on to front of the variable `values'."
|
|||
"Prompting with PROMPT, let user edit COMMAND and eval result.
|
||||
COMMAND is a Lisp expression. Let user edit that expression in
|
||||
the minibuffer, then read and evaluate the result."
|
||||
(let ((command (read-from-minibuffer prompt
|
||||
(prin1-to-string command)
|
||||
read-expression-map t
|
||||
'(command-history . 1))))
|
||||
;;; Don't add the command to the history; read-from-minibuffer has
|
||||
;;; already done that.
|
||||
;;; ;; Add edited command to command history, unless redundant.
|
||||
;;; (or (equal command (car command-history))
|
||||
;;; (setq command-history (cons command command-history)))
|
||||
(let* ((minibuffer-history-sexp-flag t)
|
||||
(command (read-from-minibuffer prompt
|
||||
(prin1-to-string command)
|
||||
read-expression-map t
|
||||
'(command-history . 1))))
|
||||
(eval command)))
|
||||
|
||||
(defun repeat-complex-command (arg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue