summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1998-10-06 23:33:04 +0000
committerKarl Heuer <kwzh@gnu.org>1998-10-06 23:33:04 +0000
commit2298f9f7d86904ee3b4600eadf7c95cf02acfa21 (patch)
tree8fd665ea010593a3e1b7429a302ea57675498947 /lisp/emacs-lisp/lisp-mode.el
parent5577e2b28a5ff5598f9db60de655a6562b851e4c (diff)
downloademacs-2298f9f7d86904ee3b4600eadf7c95cf02acfa21.tar.gz
emacs-2298f9f7d86904ee3b4600eadf7c95cf02acfa21.tar.bz2
emacs-2298f9f7d86904ee3b4600eadf7c95cf02acfa21.zip
(eval-defun): Return the evaluation result.
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<")