[commit: ghc] master: rts: add Emacs 'Local Variables' to every .c file (39b5c1c)

Simon Marlow marlowsd at gmail.com
Thu Jul 31 09:43:13 UTC 2014


On 31/07/14 10:37, Herbert Valerio Riedel wrote:
> Hello Simon,
>
> On 2014-07-31 at 10:53:20 +0200, Simon Marlow wrote:
>
> [...]
>
>>>       rts: add Emacs 'Local Variables' to every .c file
>>>
>>>       This will hopefully help ensure some basic consistency in the forward by
>>>       overriding buffer variables. In particular, it sets the wrap length, the
>>>       offset to 4, and turns off tabs.
>>
>> I'm not a huge fan of this.  Is there a way to do this without adding
>> the spam to the end of every source file?  Also it only works for
>> emacs, what if the vim folks want to add their own spam?
>
> I recently stumbled over
>
>    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d0a1a6bc05af7edd25b15ce9159025036b636ff
>
> which lead me to read up on its effect which is explained in more detail in
>
>    https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
>
> | The usual way to define directory-local variables is to put a file
> | named .dir-locals.el1 in a directory. Whenever Emacs visits any file
> | in that directory or any of its subdirectories, it will apply the
> | directory-local variables specified in .dir-locals.el, as though they
> | had been defined as file-local variables for that file (see File
> | Variables).
>
> So maybe that's a better option?

Great.  Austin, want to change over to using .dir-locals.el?

Cheers,
Simon




More information about the ghc-devs mailing list