[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13646: mode-specific and file-regexp-specific settings
From: |
Stefan Monnier |
Subject: |
bug#13646: mode-specific and file-regexp-specific settings |
Date: |
Thu, 07 Feb 2013 11:18:12 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
retitle 13646 Mode-specific and file-regexp-specific settings
thanks
> Another (more personal) argument, is that in general, I don't like the
> idea of having settings for a single functionality scattered all over
> the place. I prefer to see those settings in a centralized place, say
> a customization buffer.
We all agree. Of course this is like "the expression problem", in that
there are various ways to group settings.
I think the idea is good, but I don't think the solution should be
specific to whitespace.el.
Maybe we should instead extend dir-local settings so you can specify
a dir-local class via a regexp (and accept several dir-local classes for
a given directory, or even allow mapping a directory-regexp directly to
a set of vars without going through a class).
Also, we should introduce a way to set variables to a value that is
mode-dependent. Maybe something like
(setq-modes whitespace-style
(foo-mode 'face)
(bar-mode 'trailing)
(t 'tab-mark))
Which could turn into something akin to
(setq-default whitespace-style 'tab-mark)
(add-hook 'bar-mode-hook (lambda () (setq-local whitespace-style 'trailing)))
(add-hook 'foo-mode-hook (lambda () (setq-local whitespace-style 'face)))
Stefan
- bug#13646: Whitespace support for file/mode-specific styles and actions, Didier Verna, 2013/02/07
- bug#13646: Whitespace support for file/mode-specific styles and actions, Stefan Monnier, 2013/02/07
- bug#13646: Whitespace support for file/mode-specific styles and actions, Didier Verna, 2013/02/07
- bug#13646: Whitespace support for file/mode-specific styles and actions, Glenn Morris, 2013/02/07
- bug#13646: Whitespace support for file/mode-specific styles and actions, Glenn Morris, 2013/02/07
- bug#13646: Whitespace support for file/mode-specific styles and actions, Didier Verna, 2013/02/07
- bug#13646: Whitespace support for file/mode-specific styles and actions, Didier Verna, 2013/02/12
- bug#13646: Whitespace support for file/mode-specific styles and actions, Stefan Monnier, 2013/02/12
- bug#13646: Whitespace support for file/mode-specific styles and actions, Didier Verna, 2013/02/12
- bug#13646: Whitespace support for file/mode-specific styles and actions, Christopher Schmidt, 2013/02/12