[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs local variables
From: |
Jim Meyering |
Subject: |
Re: Emacs local variables |
Date: |
Sat, 30 Apr 2011 08:03:02 +0200 |
Reuben Thomas wrote:
> 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
Actually, there is not requirement for space-based indentation in
ChangeLog. I prefer consistent TAB-based indentation and have
periodically performed the s/^ {8}/\t/ global substitution on ChangeLog.
I've just done that again.