Mercurial > emacs
changeset 56686:c28ce21eb5ae
(eval-last-sexp): Don't cons a new symbol each time.
(eval-last-sexp-fake-value): New variable.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 16 Aug 2004 22:44:11 +0000 |
parents | 22f1ac802ffd |
children | fb266772e0e7 |
files | lisp/emacs-lisp/lisp-mode.el |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el Mon Aug 16 22:43:09 2004 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Mon Aug 16 22:44:11 2004 +0000 @@ -555,13 +555,15 @@ )))) +(defvar eval-last-sexp-fake-value (make-symbol "t")) + (defun eval-last-sexp (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in minibuffer. Interactively, with prefix argument, print output into current buffer." (interactive "P") (if (null eval-expression-debug-on-error) (eval-last-sexp-1 eval-last-sexp-arg-internal) - (let ((old-value (make-symbol "t")) new-value value) + (let ((old-value eval-last-sexp-fake-value) new-value value) (let ((debug-on-error old-value)) (setq value (eval-last-sexp-1 eval-last-sexp-arg-internal)) (setq new-value debug-on-error))