Mercurial > emacs
changeset 23388:8aa1f99efb66
(eval-defun): Return the evaluation result.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 06 Oct 1998 23:33:04 +0000 |
parents | 842d6539989b |
children | f6d920229f4c |
files | lisp/emacs-lisp/lisp-mode.el |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el Tue Oct 06 23:32:03 1998 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Tue Oct 06 23:33:04 1998 +0000 @@ -339,7 +339,8 @@ (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 @@ ;; 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<")