From: Richard M. Stallman Date: Tue, 6 Nov 2001 04:46:18 +0000 (+0000) Subject: (eval-last-sexp-1): Return the value of the evaluated form. X-Git-Tag: emacs-21.2~356 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=54e6ae14c7ae8a18edf319f86e344c28f4b3fb41;p=emacs.git (eval-last-sexp-1): Return the value of the evaluated form. --- diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index a6b15ca35df..d1f4efd64ac 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -420,17 +420,18 @@ With argument, print output into current buffer." (print-level eval-expression-print-level) (beg (point)) end) - (prin1 value) - (setq end (point)) - (when (and (bufferp standard-output) - (or (not (null print-length)) - (not (null print-level))) - (not (string= unabbreviated - (buffer-substring-no-properties beg end)))) - (last-sexp-setup-props beg end value - unabbreviated - (buffer-substring-no-properties beg end)) - ))))) + (prog1 + (prin1 value) + (setq end (point)) + (when (and (bufferp standard-output) + (or (not (null print-length)) + (not (null print-level))) + (not (string= unabbreviated + (buffer-substring-no-properties beg end)))) + (last-sexp-setup-props beg end value + unabbreviated + (buffer-substring-no-properties beg end)) + )))))) (defun eval-last-sexp (eval-last-sexp-arg-internal)