emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4d41bb7847: Improve the eval-defun doc string


From: Lars Ingebrigtsen
Subject: master 4d41bb7847: Improve the eval-defun doc string
Date: Wed, 29 Jun 2022 07:06:31 -0400 (EDT)

branch: master
commit 4d41bb7847348009f8102625ce080a2ea94984a4
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Improve the eval-defun doc string
    
    * lisp/progmodes/elisp-mode.el (eval-defun): Document what the
    command actually does w.r.t. finding a form to evaluate
    (bug#47747).
---
 lisp/progmodes/elisp-mode.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index fc25767934..0bf13a0e09 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -1679,7 +1679,10 @@ Return the result of evaluation."
     elisp--eval-defun-result))
 
 (defun eval-defun (edebug-it)
-  "Evaluate the top-level form containing point, or after point.
+  "Evaluate the top-level form containing point.
+If point isn't in a top-level form, evaluate the first top-level
+form after point.  If there is no top-level form after point,
+eval the first preceeding top-level form.
 
 If the current defun is actually a call to `defvar' or `defcustom',
 evaluating it this way resets the variable using its initial value



reply via email to

[Prev in Thread] Current Thread [Next in Thread]