[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs local variables
From: |
Reuben Thomas |
Subject: |
Re: Emacs local variables |
Date: |
Fri, 29 Apr 2011 21:58:46 +0100 |
On 29 April 2011 21:48, Bruno Haible <address@hidden> wrote:
>
> But first, did you try / are you using the code from gnulib/README?
>
> ;; In gnulib, indent with spaces everywhere (not TABs).
> ;; Exceptions: Makefile and ChangeLog modes.
> (add-hook 'find-file-hook '(lambda ()
> (if (and buffer-file-name
> (string-match "/gnulib\\>" (buffer-file-name))
> (not (string-equal mode-name "Change Log"))
> (not (string-equal mode-name "Makefile")))
> (setq indent-tabs-mode nil))))
I don't like the look of this because it adds something to a hook
unnecessarily, when having a .dir-locals.el file would be simpler and
cleaner.
> Does this code help?
No, because I have indent-tabs-mode customized to nil by default
anyway (I don't use tabs in my own files, by default).
And now I cannot get whitespace-mode to work with ChangeLogs, because
while the body of ChangeLog entries require leading tabs, the second
and subsequent lines of author headers require leading spaces. So I
guess I have to turn off whitespace-mode for ChangeLogs.
> Also, gnulib-tool does not (and probably should not) copy files that
> affect an entire directory.
I don't understand: the code above affects any directory tree matching the name.
> You can place files to be ignored also in .git/info/exclude. .gitignore
> is to list files that everyone has or is likely to have.
Thanks for that hint.
--
http://rrt.sc3d.org