# HG changeset patch # User Karl Heuer # Date 907716784 0 # Node ID 8aa1f99efb661041f958fd2a9c0b8235b425aabb # Parent 842d6539989b9bc82381c4c71b204916824e7beb (eval-defun): Return the evaluation result. diff -r 842d6539989b -r 8aa1f99efb66 lisp/emacs-lisp/lisp-mode.el --- 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<")