[PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.

2012-01-14 Thread Xavier Maillard
On Fri, 13 Jan 2012 17:54:51 -0500, Austin Clements  wrote:
> 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).
> 
> You ammended it right, but actually the configuration is intentionally
> repeated for the various modes.

That's ok.

Maybe I will find an easier way to build and to send patches

/Xavier


[PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.

2012-01-13 Thread Xavier Maillard

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))
  )
-- 
1.7.1



[PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.

2012-01-13 Thread Austin Clements
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.


[PATCH] Set fill column to 70 in .dir-locals.el and refactor other settings.

2012-01-13 Thread Xavier Maillard

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))
  )
-- 
1.7.1

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch