* Re: [Emacs-diffs] master da3e101: ; Try not to affect match data
[not found] ` <20170906152102.0B61C20E37@vcs0.savannah.gnu.org>
@ 2017-09-08 0:16 ` Stefan Monnier
2017-09-09 0:35 ` Mark Oteiza
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2017-09-08 0:16 UTC (permalink / raw)
To: emacs-devel; +Cc: Mark Oteiza
> ; Try not to affect match data
> * lisp/xdg.el (xdg-user-dir): Use save-match-data.
Why does it matter? Given the general way we handle match-data,
I think it's a bug for Elisp code to assume that something like
xdg-user-dir won't affect the match data.
Stefan
PS: And I just saw that the code says
"Return the path of user directory referred to by NAME."
which is wrong since the GNU convention is to use "path" only for
lists of directories (as in $PATH, $MANPATH, load-path, ...), so it
should say something like "file name" or just "Return the directory
referred to by NAME"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Emacs-diffs] master da3e101: ; Try not to affect match data
2017-09-08 0:16 ` [Emacs-diffs] master da3e101: ; Try not to affect match data Stefan Monnier
@ 2017-09-09 0:35 ` Mark Oteiza
0 siblings, 0 replies; 2+ messages in thread
From: Mark Oteiza @ 2017-09-09 0:35 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
On 07/09/17 at 08:16pm, Stefan Monnier wrote:
>> ; Try not to affect match data
>> * lisp/xdg.el (xdg-user-dir): Use save-match-data.
>
>Why does it matter? Given the general way we handle match-data,
>I think it's a bug for Elisp code to assume that something like
>xdg-user-dir won't affect the match data.
I guess it doesn't--I can take it out.
>PS: And I just saw that the code says
>
> "Return the path of user directory referred to by NAME."
>
> which is wrong since the GNU convention is to use "path" only for
> lists of directories (as in $PATH, $MANPATH, load-path, ...), so it
> should say something like "file name" or just "Return the directory
> referred to by NAME"
OK, I'll reword it, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-09 0:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170906152101.24092.40365@vcs0.savannah.gnu.org>
[not found] ` <20170906152102.0B61C20E37@vcs0.savannah.gnu.org>
2017-09-08 0:16 ` [Emacs-diffs] master da3e101: ; Try not to affect match data Stefan Monnier
2017-09-09 0:35 ` Mark Oteiza
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.