unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Aaron S. Hawley" <aaron.s.hawley@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: 13994@debbugs.gnu.org
Subject: bug#13994: End of buffer error for forward-sexp
Date: Wed, 24 Apr 2013 17:35:28 -0400	[thread overview]
Message-ID: <CAFw1JJ7JYM1A0h5206EHdhW3Zb3MXabfKj=5j1gKo+Yyamf4pw@mail.gmail.com> (raw)
In-Reply-To: <60DF8CA8098A46B1A6B5F6E815AC8CE4@us.oracle.com>

> Now everytime some code does (when (looking-at "\"") (forward-sexp 1)) or
> whatever it will need to be fixed to wrap it in `ignore-errors' or otherwise
> treat the `eobp' case?

What I'm finding in my small sample is that most code already has
ignore-errors or is finding the end or beginning of a buffer with a
different Emacs primitive.  In other words, no code changes!

> What's the point?  If you have some code that needs to raise an error when
> `forward-sexp' reaches eob, that's easy enough to do, no?

I wouldn't have sent a patch if I didn't think it should be the default.

> Not to mention that the code for `forward-sexp' explicitly takes point to eob
> when `scan-sexps' returns nil.  IOW, that behavior is presumably by design.

I don't believe my patch is changing that behavior.

> And not to mention that it calls `forward-sexp-function', if non-nil, to do
> everything, in which case (depending on where you would place your call to
> `error') you might be changing the meaning/behavior for its code as well, if it
> reaches eob.

I'm pretty sure my patch doesn't take anything away from the user's
ability to entirely redefine forward-sexp by setting
forward-sexp-function.





  reply	other threads:[~2013-04-24 21:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 21:54 bug#13994: End of buffer error for forward-sexp Aaron S. Hawley
2013-03-31 13:36 ` Stefan Monnier
2013-04-24 20:38   ` Aaron S. Hawley
2013-04-24 21:22     ` Drew Adams
2013-04-24 21:35       ` Aaron S. Hawley [this message]
2013-04-25  3:50     ` Stefan Monnier
2013-04-29  7:10 ` Juri Linkov
2013-04-29 12:43 ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFw1JJ7JYM1A0h5206EHdhW3Zb3MXabfKj=5j1gKo+Yyamf4pw@mail.gmail.com' \
    --to=aaron.s.hawley@gmail.com \
    --cc=13994@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).