[PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.
Austin Clements
amdragon at MIT.EDU
Fri Jan 13 14:54:51 PST 2012
Quoth Xavier Maillard on Jan 13 at 11:42 pm:
>
> This controls where comments and other text wraps. 70 is the default
> value, so this simply returns it to the default for people who have
> overridden it. Most notmuch code already adheres to this.
> ---
> SO here is the patch (still sorry if I did it wrongly and very badly).
>
> .dir-locals.el | 19 ++++++-------------
> 1 files changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/.dir-locals.el b/.dir-locals.el
> index aea630b..27f01c0 100644
> --- a/.dir-locals.el
> +++ b/.dir-locals.el
> @@ -1,23 +1,16 @@
> -; emacs local configuration settings for notmuch source
> -; surmised by dkg on 2010-11-23 13:43:18-0500
> -; amended by amdragon on 2011-06-06
> +;; emacs local configuration settings for notmuch source
> +;; surmised by dkg on 2010-11-23 13:43:18-0500
> +;; amended by amdragon on 2011-06-06
>
> -((c-mode
> +((nil
> (indent-tabs-mode . t)
> (tab-width . 8)
> (c-basic-offset . 4)
> + (fill-column . 70))
> + (c-mode
> (c-file-style . "linux"))
> (c++-mode
> - (indent-tabs-mode . t)
> - (tab-width . 8)
> - (c-basic-offset . 4)
> (c-file-style . "linux"))
> - (emacs-lisp-mode
> - (indent-tabs-mode . t)
> - (tab-width . 8))
> (shell-mode
> - (indent-tabs-mode . t)
> - (tab-width . 8)
> - (sh-basic-offset . 4)
> (sh-indentation . 4))
> )
You ammended it right, but actually the configuration is intentionally
repeated for the various modes. For some programming languages
(notably Python), it's inappropriate to mess with the tab settings
(especially indent-tabs-mode), hence I took a "whitelist" approach to
be on the safe side, rather than using global settings and then
enumerating the modes I happened to know would break.
This is admittedly subtle. There should probably be a comment in the
file explaining this.
More information about the notmuch
mailing list