[Top][All Lists]

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

Re: end-of-defun is fubsr.

From: Stefan Monnier
Subject: Re: end-of-defun is fubsr.
Date: Fri, 13 Feb 2009 23:22:48 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> ! This should move point to the next end of defun

I don't think it's quite true.  It should really be "the end of the
defun at point".  There might be a nearer EOD in a nested function.

> ! and return t on success, nil on failure.

I don't think the return result is ever used as of now.  So I'd rather
not document such a thing.

> ! It should not move further forward into any whitespace or
> ! onto the next line.

I used slightly different wording.

> ! It is called with no argument.
> ! The function can assume that point is at the beginning of a defun
> ! body or before the first defun in the buffer.")
I prefer to keep the reference to BOD-raw, which makes this starting
position much more precise.

> Another thing: in an elisp buffer, if (point-min) is in the middle of a
> defun, C-M-e takes point to the next but one EOD.  CC Mode is just as
> bad.  ;-)
> Should end-of-defun perhaps widen the buffer around its machinations?

Widening is not a good option, no.  Rather we may want to consider what
should happen if a file starts in the middle of a defun.
I am not going to lose too much sleep over this.


reply via email to

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