bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode t


From: Dmitry Gutov
Subject: bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
Date: Thu, 16 Apr 2015 23:59:20 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0

On 04/16/2015 11:15 PM, Glenn Morris wrote:

I've long since done what seems to me to be the sensible thing:

   use a mode-hook to set indent-tabs-mode to whatever the (pre-existing)
   file I'm editing seems to use.

I won't claim it's always right (for those files where the indentation
is mixed), but it's worked pretty well for me.

That sounds like a great approach, but not for this case.

The fact that indent-tabs-mode has been added to dir-locals now breaks
this, since dir-locals take precedence over mode hooks (bug#1986).

Why is that a problem? If dir-locals take precedence, then the result will be that your commits won't use tabs, except in certain subprojects like gnus or erc, which have set file-local vars differently.

That's the original intent behind this proposal: to converge all .el files to one indentation style, eventually.

So for me, this change increases the likelihood of me committing stuff
that does not match the existing indentation style. Ie, adding it to
dir-locals without untabifying every file (something which has already
been rejected) has made things worse IMO.

You seen to consider the presence of different indentation styles in any specific file to be the main problem. I disagree: most files already contain both styles, and having different styles within the project is not much better.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]