[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use directory-local variables to establish some coding styles in Ema
From: |
dak |
Subject: |
Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109) |
Date: |
Sun, 19 Aug 2012 16:37:43 +0000 |
http://codereview.appspot.com/6460109/diff/3001/.dir-locals.el
File .dir-locals.el (right):
http://codereview.appspot.com/6460109/diff/3001/.dir-locals.el#newcode6
.dir-locals.el:6: (indent-tabs-mode))
On 2012/08/19 16:02:31, Graham Percival wrote:
Does this mean what I think it means?
No, it doesn't. This is an association list written out by Emacs'
add-dir-local-variable command. If it would have been written by hand,
this line would better have looked like
(indent-tabs-mode . nil)
In Lisp, nil serves all the purposes that '() _and_ #f serve
in Scheme. So this line turns _off_ indent-tabs-mode. Turning it _on_
in this context would have looked like
(indent-tabs-mode . t)
instead. That (indent-tabs-mode) is a rather confusing print form for
(indent-tabs-mode . nil) might be one reason that Scheme decided to have
a "false" boolean separate from '().
We should have *no* tabs in C++ files
(decided in last year's GOP).
[Further complaint elided for brevity]
Substituting the equivalent longer form for the sake of human
readability is not likely a good idea since every additional call of
add-dir-local-variable will again rewrite it in the short form.
Similarly for adding a manual comment.
You'll just have to live with it. This file is not really intended for
human consumption, anyway.
http://codereview.appspot.com/6460109/
Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109), ianhulin44, 2012/08/19
Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109),
dak <=
Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109), dak, 2012/08/19
- Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109), Graham Percival, 2012/08/19
- Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109), John Mandereau, 2012/08/19
- Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109), David Kastrup, 2012/08/19
- Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109), John Mandereau, 2012/08/20
- Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109), David Kastrup, 2012/08/20
- Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109), John Mandereau, 2012/08/20
Re: Use directory-local variables to establish some coding styles in Emacs (issue 6460109), Ian Hulin, 2012/08/19