From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Shigeru Fukaya <shigeru.fukaya@gmail.com>
Cc: 17814@debbugs.gnu.org
Subject: bug#17814: 24.3.91; better string manipulation in subr-x
Date: Fri, 20 Jun 2014 15:14:56 -0400 [thread overview]
Message-ID: <jwvy4wrz97y.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <39CF8CAB123C5Fshigeru.fukaya@gmail.com>
> (string-match "\\`[\s\t\n\r]*\\(.*?\\)[\s\t\n\r]*\\'" string)
> (if (or (< 0 (match-beginning 1)) (< (match-end 1) (match-end 0)))
> (match-string 1 string)
> string))
The above string-match will fail on a string that has a newline, and the
subsequent code will use whatever was the old match-data, resulting in
broken behavior.
Other than that, I don't have any opinion on such changes (I've never
heard anyone complain about code size or cpu-time of any of those
functions, so I think it largely doesn't matter either way).
Stefan
next prev parent reply other threads:[~2014-06-20 19:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 19:10 bug#17814: 24.3.91; better string manipulation in subr-x Shigeru Fukaya
2014-06-19 20:44 ` Stefan Monnier
2014-06-20 17:14 ` Shigeru Fukaya
2014-06-20 19:14 ` Stefan Monnier [this message]
2014-06-21 4:07 ` Shigeru Fukaya
2018-09-19 1:37 ` Noam Postavsky
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=jwvy4wrz97y.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=17814@debbugs.gnu.org \
--cc=shigeru.fukaya@gmail.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).