diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-29 13:05:46 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-29 13:05:46 +0200 |
commit | 4d41bb7847348009f8102625ce080a2ea94984a4 (patch) | |
tree | f81112567e260d6b80fd120fd8d81f7731c89833 /lisp/progmodes/elisp-mode.el | |
parent | 446d5b14a90e35cd0d67cd22592cde7a6d2891f9 (diff) | |
download | emacs-4d41bb7847348009f8102625ce080a2ea94984a4.tar.gz emacs-4d41bb7847348009f8102625ce080a2ea94984a4.tar.bz2 emacs-4d41bb7847348009f8102625ce080a2ea94984a4.zip |
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).
Diffstat (limited to 'lisp/progmodes/elisp-mode.el')
-rw-r--r-- | lisp/progmodes/elisp-mode.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index fc257679340..0bf13a0e09e 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 |