[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add file-locals and dir-locals
From: |
Juri Linkov |
Subject: |
Re: Add file-locals and dir-locals |
Date: |
Wed, 05 Aug 2009 02:59:41 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) |
> I forgot to mention in the last post that there is also directory-local
> variables, which I think should also be supported. But we can get
> support for file local variables first and worry about that later.
This was implemented already.
> I'd prefer the default to add to the end of a buffer, because file local
> variables at the end of a file is more difficult to get right manually.
>
> With one C-u, add to the header
>
> With two C-u, add to .dir-locals.el
This requires from the user leaning and remembering
how many C-u to type.
> Another approach is to give the user a list to select:
>
> 1. head 2. foot 3. dir
This is not convenient to use.
Meanwhile I implemented new commands `add-file-local-variable-prop-line'
and `delete-file-local-variable-prop-line'. The suffix `-prop-line'
is by analogy with the pair of functions `hack-local-variables' and
`hack-local-variables-prop-line'.
As not frequently used commands, it's not difficult for the user to
select the necessary command using completions for M-x:
M-x add-file-local-variable RET
M-x add-file-local-variable-prop-line RET
M-x add-dir-local-variable RET
Please try these commands and tell what do you think.
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: Add file-locals and dir-locals,
Juri Linkov <=
Re: Add file-locals and dir-locals, Dan Nicolaescu, 2009/08/08