[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
.dir-locals.el
From: |
Eli Zaretskii |
Subject: |
.dir-locals.el |
Date: |
Fri, 26 Dec 2008 17:18:56 +0200 |
This part of .dir-locals.el from today's CVS does not seem to work:
("lisp/mail/pmail*"
. ((nil . ((change-log-default-name . "ChangeLog.pmail"))))))
(To see that, you will need to remove the file-local variables from
pmail*.el files, because they specify ChangeLog.pmail there as well.)
I took a look at relevant functions in files.el, and it looks like
this wasn't supposed to work with file wildcards. This fragment from
dir-locals-collect-variables:
(when (and sub-file-name
(>= (length sub-file-name) (length key))
(string= key (substring sub-file-name 0 (length key))))
(setq variables (dir-locals-collect-variables
(cdr entry) root variables))))
assumes that "lisp/mail/pmail*" is a substring of "lisp/mail/pmail.el",
which of course is false because of the `*'. The documentation of the
feature in the manual also seems to say that the intent is to specify
here a name of a _directory_ and have that apply to all the files
under that directory.
I tried to see if this works if I change "lisp/mail/pmail*" to just
"lisp/mail", and that still didn't work for an arbitrary Lisp file in
lisp/mail: typing "C-x 4 a" after visiting the file still pops up
ChangeLog, not ChangeLog.pmail. So maybe I'm missing something here,
and the above report is bogus; apologies if that is the case.