emacs-devel
[Top][All Lists]
Advanced

[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: Sun, 19 Jul 2009 00:54:19 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

>> Since `add-file-local-variable' does both "add" and "replace" operations
>> it makes sense to rename it to `set-file-local-variable'.  But isn't "set"
>> rather connotes with an operation that reads a variable's value and sets
>> it to the variable with setq?
>
> I don't care about the name.  But please fix the doc-strings accordingly ;-)

This is fixed below.  A new non-interactive function
`modify-file-local-variable' for dealing with internal processing of the
Local Variables list accepts two possible values of the new argument `op':
`add-or-replace' and `delete'.  It is possible to easily change this
function to accept more operations such as `add' that will only add
a new variable but never delete old values and so on.

But I think currently two operations are enough.  From the user's POV
there are two commands `add-file-local-variable' and
`delete-file-local-variable' that rely on the internal function
`modify-file-local-variable'.  The user might want either add a new
variable instead of all its old settings or delete it.

Attachment: add-local.el
Description: application/emacs-lisp

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

reply via email to

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