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

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

bug#17247: 24.4.50; end-of-defun bug in elisp


From: Dmitry Gutov
Subject: bug#17247: 24.4.50; end-of-defun bug in elisp
Date: Tue, 20 May 2014 15:12:18 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 20.05.2014 10:59, Andreas Röhler wrote:

AFAIU the purpose is to make sure the beginning of current defun is
fetched, not the previous one, i.e. protect for cases, point is at the
beginning of defun.

Guess so. So with the proposed change, the point at the beginning of a defun doesn't "belong" to it anymore, but is considered "between defuns" instead. Seems to work fine, at least with the given Elisp example and a couple similar ones, with small differences.

IMHO that end-of-defun section  is over-engineered, thus bug-sourcing.

For example the common design-logic when taking numeric arguments: with
positiv go forward, with negativ backward, resp. negate assumed direction.

This seems broken internally by (funcall end-of-defun-function), which
doesn't care for arguments.

The additional logic seems to be there to differentiate between two cases: we are inside a defun (beginning-of-defun followed by end-of-defun will move point forward), we are between defuns (beginning-of-defun followed by end-of-defun will move point backward), and handle them appropriately.





reply via email to

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