summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 3396071c5ed..ab6efd137e0 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -339,7 +339,8 @@ With argument, print output into current buffer."
(defun eval-defun (eval-defun-arg-internal)
"Evaluate defun that point is in or before.
Print value in minibuffer.
-With argument, insert value in current buffer after the defun."
+With argument, insert value in current buffer after the defun.
+Return the result of evaluation."
(interactive "P")
(let ((standard-output (if eval-defun-arg-internal (current-buffer) t))
beg end form)
@@ -367,7 +368,10 @@ With argument, insert value in current buffer after the defun."
;; Skipping to the end of the specified region
;; will make eval-region return.
(goto-char end)
- form)))))
+ form))
+ ;; The result of evaluation has been put onto VALUES.
+ ;; So return it.
+ (car values))))
(defun lisp-comment-indent ()
(if (looking-at "\\s<\\s<\\s<")