emacs-devel
[Top][All Lists]
Advanced

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

Re: Blunderbuss ".dir-locals.el" raises everything in its path!!


From: Juri Linkov
Subject: Re: Blunderbuss ".dir-locals.el" raises everything in its path!!
Date: Thu, 16 Jul 2009 23:48:33 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

>> The patch below adds this information to the output of `C-h v'.
>> It distinguishes file-local variables from dir-local variables
>> by subtracting `file-local-variables-alist' from `dir-local-variables-alist',
>> i.e. a file-local variable with its value is a member of only
>> `file-local-variables-alist', but a dir-local variable with its value
>> is a member of both.
>
> If the variable is set in both, we should be careful to say it's
> "file-local" and not "dir-local".

Sorry, I don't understand.  If the variable is set in both
`file-local-variables-alist' and `(dir-local-variables-alist)',
then it's "dir-local" and not "file-local".

For a file-local variable, C-h v will say:

  This variable is a file-local variable.

For a directory-local variable, C-h v will say:

  This variable is a directory-local variable
  from the file ".../.dir-locals.el".

>> `dir-local-variables-alist' is a new function refactored from
>> `hack-dir-local-variables'.  It seems it should not be a variable
>> since it is required now only for documentation purposes.
>
> The problem with that is that if the dir-local.el file changes between
> the time you open the file and the C-h v, you'll get incorrect results.

The main purpose of adding an information about .dir-locals.el in C-h v
is to warn the user about a new dir-local mechanism that s?he might
not be aware of.  This warning is less useful when the user already
has dealt with dir-local.el files.

Or do you think a new variable `dir-local-variables-alist'
would be better?

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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