From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Relics of removed dir-locals-file-2 feature in pretest Date: Thu, 23 Nov 2017 17:53:43 +0200 Message-ID: <83d149at4o.fsf@gnu.org> References: <833757cqy7.fsf@gnu.org> <83tvxmbat5.fsf@gnu.org> <83lgiyb801.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1511452484 29914 195.159.176.226 (23 Nov 2017 15:54:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Nov 2017 15:54:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kaushal Modi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 23 16:54:40 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 1eHtpl-0007Lk-Qc for ged-emacs-devel@m.gmane.org; Thu, 23 Nov 2017 16:54:37 +0100 Original-Received: from localhost ([::1]:44969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHtpt-0000az-97 for ged-emacs-devel@m.gmane.org; Thu, 23 Nov 2017 10:54:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHtox-0000ZC-Ro for emacs-devel@gnu.org; Thu, 23 Nov 2017 10:53:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHtos-0006EH-TF for emacs-devel@gnu.org; Thu, 23 Nov 2017 10:53:46 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHtos-0006E9-Qo; Thu, 23 Nov 2017 10:53:42 -0500 Original-Received: from [176.228.60.248] (port=1917 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eHtos-0003n1-8P; Thu, 23 Nov 2017 10:53:42 -0500 In-reply-to: (message from Kaushal Modi on Wed, 22 Nov 2017 16:28:18 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:220395 Archived-At: > From: Kaushal Modi > Date: Wed, 22 Nov 2017 16:28:18 +0000 > Cc: emacs-devel@gnu.org > > OK, at the risk of sounding very stupid.. this feature was removed and then added again in this commit: > http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-26&id=da976cff352bdea6adc2667582a56eb4061bb5f6 > > > Right? No, it was added first, and then removed _only_ from the emacs-25 branch. It was left on master (where it was merged from emacs-25), and therefore it stays on today's emacs-26 and on master. > The defconst dir-locals-file-2 is added in that commit, but is not used anywhere. > > Looking at the dir-locals--all-files code in that commit, from what I understand, the let-bound file-2 derivation is > hard-coded, and has nothing to do with dir-locals-file-2: > > (file-2 (when (string-match "\\.el\\'" file-1) > (replace-match "-2.el" t nil file-1))) > > Is that correct? The facts are correct, yes. > So should the dir-locals-file-2 defconst and all its mentions be removed from doc? Or should > that var instead be used in dir-locals--all-files and wherever else applicable? We could remove the defconst, but just removing it is not enough, because that would also remove its doc string. So we will have to do something else in order to keep that special file name documented (e.g., so that "M-x apropos-documentation" would find it). I'm not sure we should invest such an effort: after all, what's there does work, so why fix that which ain't broken?