emacs-devel
[Top][All Lists]
Advanced

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

Add file-locals and dir-locals (was: Blunderbuss ".dir-locals.el" raises


From: Juri Linkov
Subject: Add file-locals and dir-locals (was: Blunderbuss ".dir-locals.el" raises everything in its path!!)
Date: Fri, 17 Jul 2009 03:18:19 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

> (The thing that irritates me about dir-locals is their syntactic
> incompatiblity with file-locals.   If I want to promote a file local
> I've been setting on a bunch of files to directory local, AFAIK I need to
> rejig the syntax.)

It is possible to blur the difference between formats of file-locals and
dir-locals with the help of new commands.  The file etc/TODO has the
following entry:

** Add a command to make a "Local Variables" section in the current buffer
  and/or add a variable to the list.

Below is an initial version of two commands that will close this TODO entry.

`add-file-local-variable' adds file-local variable with its value to the
Local Variables list.  `add-dir-local-variable' adds directory-local
variable with its value and mode to the .dir-locals.el file.  Based on
this implementation another commands could be added later that will
move file-local variables to .dir-locals.el and vice versa.

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]