bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32201: 27.0.50; setenv should not change match-data


From: Noam Postavsky
Subject: bug#32201: 27.0.50; setenv should not change match-data
Date: Wed, 18 Jul 2018 21:56:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

John Shahid <address@hidden> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]