aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorBrian Fox1993-10-25 06:07:23 +0000
committerBrian Fox1993-10-25 06:07:23 +0000
commitadca5fa6ccdc30ceea907f1468fccef707988a6d (patch)
treef2ae3bbee1d52aec9466c51137f93d5a2e77f502 /lisp
parent4579dd4297f85fc2375ec168ef60ea532ae2c5bd (diff)
downloademacs-adca5fa6ccdc30ceea907f1468fccef707988a6d.tar.gz
emacs-adca5fa6ccdc30ceea907f1468fccef707988a6d.zip
(eval-expression, edit-and-eval-command): Let
minibuffer-history-sexp-flag be 't during the call to read-from-minibuffer.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el22
1 files changed, 10 insertions, 12 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index a9a262cee16..8babd63b47d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -382,9 +382,11 @@ Other major modes are defined by comparison with this one."
382(defun eval-expression (expression) 382(defun eval-expression (expression)
383 "Evaluate EXPRESSION and print value in minibuffer. 383 "Evaluate EXPRESSION and print value in minibuffer.
384Value is also consed on to front of the variable `values'." 384Value is also consed on to front of the variable `values'."
385 (interactive (list (read-from-minibuffer "Eval: " 385 (interactive
386 nil read-expression-map t 386 (let* ((minibuffer-history-sexp-flag t))
387 'read-expression-history))) 387 (list (read-from-minibuffer "Eval: "
388 nil read-expression-map t
389 'read-expression-history)))
388 (setq values (cons (eval expression) values)) 390 (setq values (cons (eval expression) values))
389 (prin1 (car values) t)) 391 (prin1 (car values) t))
390 392
@@ -392,15 +394,11 @@ Value is also consed on to front of the variable `values'."
392 "Prompting with PROMPT, let user edit COMMAND and eval result. 394 "Prompting with PROMPT, let user edit COMMAND and eval result.
393COMMAND is a Lisp expression. Let user edit that expression in 395COMMAND is a Lisp expression. Let user edit that expression in
394the minibuffer, then read and evaluate the result." 396the minibuffer, then read and evaluate the result."
395 (let ((command (read-from-minibuffer prompt 397 (let* ((minibuffer-history-sexp-flag t)
396 (prin1-to-string command) 398 (command (read-from-minibuffer prompt
397 read-expression-map t 399 (prin1-to-string command)
398 '(command-history . 1)))) 400 read-expression-map t
399;;; Don't add the command to the history; read-from-minibuffer has 401 '(command-history . 1))))
400;;; already done that.
401;;; ;; Add edited command to command history, unless redundant.
402;;; (or (equal command (car command-history))
403;;; (setq command-history (cons command command-history)))
404 (eval command))) 402 (eval command)))
405 403
406(defun repeat-complex-command (arg) 404(defun repeat-complex-command (arg)