unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: John Shahid <jvshahid@gmail.com>
Cc: 32201@debbugs.gnu.org
Subject: bug#32201: 27.0.50; setenv should not change match-data
Date: Sat, 21 Jul 2018 21:30:02 -0400	[thread overview]
Message-ID: <87pnzg5a79.fsf@gmail.com> (raw)
In-Reply-To: <87o9f46l9a.fsf@gmail.com> (Noam Postavsky's message of "Wed, 18 Jul 2018 21:56:49 -0400")

tags 32201 fixed
close 32201 26.2
quit

Noam Postavsky <npostavs@gmail.com> writes:

> John Shahid <jvshahid@gmail.com> writes:
>
>>> Anyway, I don't think setenv should be changed, rather
>>> abbreviate-file-name should save-match-data around the expand-file-name
>>> call.  After all, today you happened to use setenv in a hook, tomorrow
>>> someone will use another match-data modifying function.
>>
>> I agree, but I also think that there is no reason for `setenv' to use
>> `string-match' instead of `string-match-p'.  It doesn't seem to be using
>> the match data anyway.  I attached the patch that replaces
>> `string-match' with `string-match-p' in `setenv' and `setenv-internal'.
>> WDYT ?
>
> Seems harmless enough.  I'll wait a couple of days, and then push my
> abbreviate-file-name patch to emacs-26 and this patch to master.

Done.

[1: 59e8533286]: 2018-07-21 21:07:07 -0400
  Add save-match-data to abbreviate-file-name (Bug#32201)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=59e8533286cc8b5abc80b0966ef4b9fb676fbdfe

[2: b7ca3d5d93]: 2018-07-21 21:10:20 -0400
  Avoid destroying match data in 'setenv' (Bug#32201)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=b7ca3d5d932bad6900296679ab87f7d0d64d1de9





      reply	other threads:[~2018-07-22  1:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 19:18 bug#32201: 27.0.50; setenv should not change match-data John Shahid
     [not found] ` <handler.32201.B.153194154418543.ack@debbugs.gnu.org>
2018-07-18 19:25   ` bug#32201: Acknowledgement (27.0.50; setenv should not change match-data) John Shahid
2018-07-18 22:52 ` bug#32201: 27.0.50; setenv should not change match-data Noam Postavsky
2018-07-19  0:22   ` John Shahid
2018-07-19  1:56     ` Noam Postavsky
2018-07-22  1:30       ` Noam Postavsky [this message]

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=87pnzg5a79.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=32201@debbugs.gnu.org \
    --cc=jvshahid@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).