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

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

bug#20322: 25.0.50; indent-tabs-mode should default to nil


From: Dmitry Gutov
Subject: bug#20322: 25.0.50; indent-tabs-mode should default to nil
Date: Fri, 17 Apr 2015 16:14:45 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0

On 04/17/2015 07:58 AM, Stefan Monnier wrote:

Yup.  Adding more mode-specific variables to circumvent the problem is
not a good idea.  If add-hook+lambda is considered too cumbersome, we
can wrap it in some function/macro to make it look prettier.

Even if a user is fine with writing a lambda or using some new macro, they'd still have to fist discover that a specific mode overrides a given variable during its initialization.

AFAIK, a lot of fairly experienced users don't routinely use `find-function'.

I personally find that Custom should grow a way to set the value of
those variables "per mode" or maybe even "per directory".

"per directory" sounds like an appropriate addition to the project management functionality, which we'll grow any day now.

"per mode" sounds easier, and maybe we can start with defining a programmatic API for that. How about a global variable, using the same format as .dir-locals.el contents?

And then have an element at the end of `after-change-major-mode-hook' that would apply these values (or simply hardcode that logic in `run-mode-hooks').

One aspect I'm not clear on is how the modes would add elements to it. There'll probably be a button like "erase customization for this mode" in the Customize interface, but how would it know, and how would it convey to the user, that the variable would revert to the mode-specific value, not the global one?





reply via email to

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