From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Didier Verna <didier@didierverna.net>
Cc: 13646@debbugs.gnu.org, viniciusjl@ig.com.br
Subject: bug#13646: mode-specific and file-regexp-specific settings
Date: Thu, 07 Feb 2013 11:18:12 -0500 [thread overview]
Message-ID: <jwvy5f0ce7i.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m27gmk5gks.fsf@didierverna.net> (Didier Verna's message of "Thu, 07 Feb 2013 15:44:35 +0100")
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
next prev parent reply other threads:[~2013-02-07 16:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-07 12:43 bug#13646: Whitespace support for file/mode-specific styles and actions Didier Verna
2013-02-07 14:26 ` Stefan Monnier
2013-02-07 14:44 ` Didier Verna
2013-02-07 16:18 ` Stefan Monnier [this message]
2013-02-07 16:56 ` bug#13646: mode-specific and file-regexp-specific settings Didier Verna
2013-02-07 17:25 ` Didier Verna
2013-02-07 21:47 ` bug#13646: Whitespace support for file/mode-specific styles and actions Glenn Morris
2013-02-07 21:48 ` Glenn Morris
2013-02-07 22:00 ` Didier Verna
2013-02-12 8:55 ` Didier Verna
2013-02-12 14:10 ` Stefan Monnier
2013-02-12 14:17 ` Didier Verna
2013-02-12 17:00 ` Christopher Schmidt
2020-09-18 14:38 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvy5f0ce7i.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=13646@debbugs.gnu.org \
--cc=didier@didierverna.net \
--cc=viniciusjl@ig.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.