emacs-devel
[Top][All Lists]
Advanced

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

Re: Relics of removed dir-locals-file-2 feature in pretest


From: Eli Zaretskii
Subject: Re: Relics of removed dir-locals-file-2 feature in pretest
Date: Thu, 23 Nov 2017 17:53:43 +0200

> From: Kaushal Modi <address@hidden>
> Date: Wed, 22 Nov 2017 16:28:18 +0000
> Cc: address@hidden
> 
> 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?



reply via email to

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