From: Paul Eggert <eggert@cs.ucla.edu>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 13fe8a2: Fix rare undefined behaviors in replace-match
Date: Sat, 3 Aug 2019 13:30:08 -0700 [thread overview]
Message-ID: <a25c11b7-8dbc-781c-b357-17e0ea77e753@cs.ucla.edu> (raw)
In-Reply-To: <87sgqic8rn.fsf@mouse.gnus.org>
Lars Ingebrigtsen wrote:
> This is probably a better error to signal here for this error, but it
> possibly changes the behaviour. If somebody previously had
> condition-case'd this for args-out-of-range, then they'll get a new
> error signalled now (which is why I kept that signal)...
In this particular case the error is so rare and the signal so inappropriate for
the error that I thought it better to make the signal more accurate. It's
possible for (replace-match ... N) to work for N equal to 0, 1, 3, and 4 but to
signal an error for other N, so signaling an args-out-of-range error when N=2
would be misleading.
Another possibility would be to signal a domain error when N=2 in that example.
next prev parent reply other threads:[~2019-08-03 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190803200033.5628.11021@vcs0.savannah.gnu.org>
[not found] ` <20190803200034.9E5F1209B1@vcs0.savannah.gnu.org>
2019-08-03 20:07 ` master 13fe8a2: Fix rare undefined behaviors in replace-match Lars Ingebrigtsen
2019-08-03 20:30 ` Paul Eggert [this message]
2019-08-03 21:02 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a25c11b7-8dbc-781c-b357-17e0ea77e753@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.