bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#47747: 28.0.50; `eval-defun' may evaluate previous sexp


From: Lars Ingebrigtsen
Subject: bug#47747: 28.0.50; `eval-defun' may evaluate previous sexp
Date: Wed, 05 May 2021 18:10:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Sebastian Miele <sebastian.miele@gmail.com> writes:

> With emacs -Q, a *scratch* buffer of
>
>   ;; start of buffer
>   (error "")
>   ;; !!! point somewhere here !!!
>   ;; end of buffer
>
> and point where indicated, invoking `eval-defun' (C-M-x) evaluates the
> expression (error "").
>
> Expected: An error indicating that there is no top-level form containing
> point, or after point.  (From `eval-defun's docstring: "Evaluate the
> top-level form containing point, or after point.")

If there are no forms after point, it'll eval the form before point --
and it's been that way for as long as I can remember, so I think the doc
string is just wrong here.

Does anybody else have an opinion here?  Would it make sense to have the
command signal an error if there's no forms at or after point?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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