From 54e6ae14c7ae8a18edf319f86e344c28f4b3fb41 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 6 Nov 2001 04:46:18 +0000 Subject: [PATCH] (eval-last-sexp-1): Return the value of the evaluated form. --- lisp/emacs-lisp/lisp-mode.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) 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) -- 2.39.2