GNU bug report logs -
#13994
End of buffer error for forward-sexp
Previous Next
Full log
Message #20 received at 13994 <at> debbugs.gnu.org (full text, mbox):
>>> I would like C-M-f (`forward-sexp') to signal an error when reaching
>>> the beginning or end of a buffer.
>> That would make sense, indeed, but I'm afraid there's a fair bit of code
>> out there that needs the current behavior.
> I by no means use all of Emacs, but haven't run into an issue yet with
> my patch. I use Emacs with t-d-o-e on.
Thoughts in random order:
- the gain is not very large, so the pain needs to be very low.
- forward-sexp is used at many places in many different circumstances,
so it's difficult to find risky cases.
- I do agree that it is very likely that many/most uses of forward-sexp
wouldn't suffer.
- Even if few problematic cases are out there (or out here in Emacs
itself), it may take a very long time (read: not before an actual
release) to find some of them.
- your patch only affects behavior at BOB/EOB, whereas I think it would
make more sense to do the same for "before the first non-whitespace"
and "after the last non-whitespace". And comments should be considered
whitespace in this respect (at least when parse-sexp-ignore-comments
is non-nil). Of course, fixing this might introduce more
problematic cases.
Stefan
This bug report was last modified 9 years and 94 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.