[PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-07 Thread Dmitry Kurochkin
Hi Austin.

On Tue,  7 Jun 2011 01:20:25 -0400, Austin Clements  wrote:
> Also, slightly reformat dir-locals.el so that the settings align and
> to make it friendlier for future additions.
> ---
>  .dir-locals.el |   18 ++
>  1 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/.dir-locals.el b/.dir-locals.el
> index cbdb1f9..eff29fc 100644
> --- a/.dir-locals.el
> +++ b/.dir-locals.el
> @@ -1,7 +1,17 @@
>  ; 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 . ((indent-tabs-mode . t)
> -(tab-width . 8)
> -(c-basic-offset . 4)
> -(c-file-style . "linux"
> +((c-mode
> +  (indent-tabs-mode . t)
> +  (tab-width . 8)
> +  (c-basic-offset . 4)
> +  (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))
> + )

Why tab-width is not set for the emacs-lisp-mode?

Also, perhaps we should set these variables for all modes?  Setting
c-basic-offset and c-file-style should not hurt.  And indent-tabs-mode
and tab-width should be relevant for any file in notmuch (shell, python,
probably even text files), no?

Regards,
  Dmitry

> -- 
> 1.7.5.1
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-07 Thread Austin Clements
On Tue, Jun 7, 2011 at 2:38 AM, Dima Kogan  
wrote:
>> On Tue, ?7 Jun 2011 01:20:25 -0400
>> Austin Clements  wrote:
>>
>> Also, slightly reformat dir-locals.el so that the settings align and
>> to make it friendlier for future additions.
>
> Should we also add:
>
> (tab-always-indent . nil)

tab-always-indent is a user-interface preference and definitely
shouldn't be overridden by .dir-locals.  (Personally, I would go crazy
if I had tab-always-indent set to nil.)

> (indent-tabs-mode ?. t)

I'll add this for shell-mode.  As I pointed out in my reply to Dmitry,
this shouldn't be set globally.  Are there any other specific modes it
should be set for?

> Otherwise the setups of people who normally use spaces will still
> insert spaces when 'tab' is depressed.


[PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-07 Thread Austin Clements
Quoth Dmitry Kurochkin on Jun 07 at  9:27 am:
> Hi Austin.
> 
> On Tue,  7 Jun 2011 01:20:25 -0400, Austin Clements  
> wrote:
> > Also, slightly reformat dir-locals.el so that the settings align and
> > to make it friendlier for future additions.
> > ---
> >  .dir-locals.el |   18 ++
> >  1 files changed, 14 insertions(+), 4 deletions(-)
> > 
> > diff --git a/.dir-locals.el b/.dir-locals.el
> > index cbdb1f9..eff29fc 100644
> > --- a/.dir-locals.el
> > +++ b/.dir-locals.el
> > @@ -1,7 +1,17 @@
> >  ; 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 . ((indent-tabs-mode . t)
> > -(tab-width . 8)
> > -(c-basic-offset . 4)
> > -(c-file-style . "linux"
> > +((c-mode
> > +  (indent-tabs-mode . t)
> > +  (tab-width . 8)
> > +  (c-basic-offset . 4)
> > +  (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))
> > + )
> 
> Why tab-width is not set for the emacs-lisp-mode?

Because I forgot to set it.  ]:--8)

> Also, perhaps we should set these variables for all modes?  Setting
> c-basic-offset and c-file-style should not hurt.  And indent-tabs-mode
> and tab-width should be relevant for any file in notmuch (shell, python,
> probably even text files), no?

Personally, I would prefer to keep .dir-locals conservative, rather
than make sweeping settings.  For example, the Python code isn't (and
definitely shouldn't be) using tabs.  Adding settings for shell is a
good idea, though.

> Regards,
>   Dmitry


[PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-07 Thread Austin Clements
Also, slightly reformat dir-locals.el so that the settings align and
to make it friendlier for future additions.
---
 .dir-locals.el |   18 ++
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index cbdb1f9..eff29fc 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,7 +1,17 @@
 ; 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 . ((indent-tabs-mode . t)
-(tab-width . 8)
-(c-basic-offset . 4)
-(c-file-style . "linux"
+((c-mode
+  (indent-tabs-mode . t)
+  (tab-width . 8)
+  (c-basic-offset . 4)
+  (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))
+ )
-- 
1.7.5.1



Re: [PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-07 Thread Austin Clements
On Tue, Jun 7, 2011 at 2:38 AM, Dima Kogan  wrote:
>> On Tue,  7 Jun 2011 01:20:25 -0400
>> Austin Clements  wrote:
>>
>> Also, slightly reformat dir-locals.el so that the settings align and
>> to make it friendlier for future additions.
>
> Should we also add:
>
> (tab-always-indent . nil)

tab-always-indent is a user-interface preference and definitely
shouldn't be overridden by .dir-locals.  (Personally, I would go crazy
if I had tab-always-indent set to nil.)

> (indent-tabs-mode  . t)

I'll add this for shell-mode.  As I pointed out in my reply to Dmitry,
this shouldn't be set globally.  Are there any other specific modes it
should be set for?

> Otherwise the setups of people who normally use spaces will still
> insert spaces when 'tab' is depressed.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-06 Thread Austin Clements
Quoth Dmitry Kurochkin on Jun 07 at  9:27 am:
> Hi Austin.
> 
> On Tue,  7 Jun 2011 01:20:25 -0400, Austin Clements  wrote:
> > Also, slightly reformat dir-locals.el so that the settings align and
> > to make it friendlier for future additions.
> > ---
> >  .dir-locals.el |   18 ++
> >  1 files changed, 14 insertions(+), 4 deletions(-)
> > 
> > diff --git a/.dir-locals.el b/.dir-locals.el
> > index cbdb1f9..eff29fc 100644
> > --- a/.dir-locals.el
> > +++ b/.dir-locals.el
> > @@ -1,7 +1,17 @@
> >  ; 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 . ((indent-tabs-mode . t)
> > -(tab-width . 8)
> > -(c-basic-offset . 4)
> > -(c-file-style . "linux"
> > +((c-mode
> > +  (indent-tabs-mode . t)
> > +  (tab-width . 8)
> > +  (c-basic-offset . 4)
> > +  (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))
> > + )
> 
> Why tab-width is not set for the emacs-lisp-mode?

Because I forgot to set it.  ]:--8)

> Also, perhaps we should set these variables for all modes?  Setting
> c-basic-offset and c-file-style should not hurt.  And indent-tabs-mode
> and tab-width should be relevant for any file in notmuch (shell, python,
> probably even text files), no?

Personally, I would prefer to keep .dir-locals conservative, rather
than make sweeping settings.  For example, the Python code isn't (and
definitely shouldn't be) using tabs.  Adding settings for shell is a
good idea, though.

> Regards,
>   Dmitry
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-06 Thread Dima Kogan
> On Tue,  7 Jun 2011 01:20:25 -0400
> Austin Clements  wrote:
>
> Also, slightly reformat dir-locals.el so that the settings align and
> to make it friendlier for future additions.

Should we also add:

(tab-always-indent . nil)
(indent-tabs-mode  . t)

Otherwise the setups of people who normally use spaces will still
insert spaces when 'tab' is depressed.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-06 Thread Dima Kogan
> On Tue,  7 Jun 2011 01:20:25 -0400
> Austin Clements  wrote:
>
> Also, slightly reformat dir-locals.el so that the settings align and
> to make it friendlier for future additions.

Should we also add:

(tab-always-indent . nil)
(indent-tabs-mode  . t)

Otherwise the setups of people who normally use spaces will still
insert spaces when 'tab' is depressed.


Re: [PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-06 Thread Dmitry Kurochkin
Hi Austin.

On Tue,  7 Jun 2011 01:20:25 -0400, Austin Clements  wrote:
> Also, slightly reformat dir-locals.el so that the settings align and
> to make it friendlier for future additions.
> ---
>  .dir-locals.el |   18 ++
>  1 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/.dir-locals.el b/.dir-locals.el
> index cbdb1f9..eff29fc 100644
> --- a/.dir-locals.el
> +++ b/.dir-locals.el
> @@ -1,7 +1,17 @@
>  ; 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 . ((indent-tabs-mode . t)
> -(tab-width . 8)
> -(c-basic-offset . 4)
> -(c-file-style . "linux"
> +((c-mode
> +  (indent-tabs-mode . t)
> +  (tab-width . 8)
> +  (c-basic-offset . 4)
> +  (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))
> + )

Why tab-width is not set for the emacs-lisp-mode?

Also, perhaps we should set these variables for all modes?  Setting
c-basic-offset and c-file-style should not hurt.  And indent-tabs-mode
and tab-width should be relevant for any file in notmuch (shell, python,
probably even text files), no?

Regards,
  Dmitry

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


[PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-06 Thread Austin Clements
Also, slightly reformat dir-locals.el so that the settings align and
to make it friendlier for future additions.
---
 .dir-locals.el |   18 ++
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index cbdb1f9..eff29fc 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,7 +1,17 @@
 ; 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 . ((indent-tabs-mode . t)
-(tab-width . 8)
-(c-basic-offset . 4)
-(c-file-style . "linux"
+((c-mode
+  (indent-tabs-mode . t)
+  (tab-width . 8)
+  (c-basic-offset . 4)
+  (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))
+ )
-- 
1.7.5.1

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