emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master da3e101: ; Try not to affect match data


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master da3e101: ; Try not to affect match data
Date: Thu, 07 Sep 2017 20:16:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>     ; 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"




reply via email to

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