From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master da3e101: ; Try not to affect match data Date: Thu, 07 Sep 2017 20:16:33 -0400 Message-ID: References: <20170906152101.24092.40365@vcs0.savannah.gnu.org> <20170906152102.0B61C20E37@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1504829839 1263 195.159.176.226 (8 Sep 2017 00:17:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Sep 2017 00:17:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Mark Oteiza To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 08 02:17:05 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dq6yS-00079q-C5 for ged-emacs-devel@m.gmane.org; Fri, 08 Sep 2017 02:16:44 +0200 Original-Received: from localhost ([::1]:42747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dq6yZ-00085J-J5 for ged-emacs-devel@m.gmane.org; Thu, 07 Sep 2017 20:16:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dq6yP-00084z-FC for emacs-devel@gnu.org; Thu, 07 Sep 2017 20:16:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dq6yK-0003QU-H4 for emacs-devel@gnu.org; Thu, 07 Sep 2017 20:16:41 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:34393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dq6yK-0003QF-BM for emacs-devel@gnu.org; Thu, 07 Sep 2017 20:16:36 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v880GYZ9014239; Thu, 7 Sep 2017 20:16:34 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id DFED866334; Thu, 7 Sep 2017 20:16:33 -0400 (EDT) In-Reply-To: <20170906152102.0B61C20E37@vcs0.savannah.gnu.org> (Mark Oteiza's message of "Wed, 6 Sep 2017 11:21:01 -0400 (EDT)") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6111=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6111> : inlines <6059> : streams <1762044> : uri <2496700> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217999 Archived-At: > ; 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"