GNU bug report logs -
#13646
Mode-specific and file-regexp-specific settings
Previous Next
Reported by: Didier Verna <didier <at> didierverna.net>
Date: Thu, 7 Feb 2013 12:46:01 UTC
Severity: wishlist
Tags: wontfix
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Stefan Monnier <monnier <at> IRO.UMontreal.CA> wrote:
> I think the idea is good, but I don't think the solution should be
> specific to whitespace.el.
A general solution would be nice of course (but this is frightening;
see below). I'm not familiar enough with the dir-local functionality
(XEmacs doesn't have that) to comment on it though.
> 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))
This looks a bit hackish. If you're going down that road and want to
be that general, why stop here ? Someday, someone will want
window-specific values and what not and you'll end up with tons of
setq variants. And then, you're gonna wish you had specifiers in the
first place (and /that/ is frightening) :-)
> 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)))
Question: if you have both the above and dir-local settings, which
ones take precedence (I hope the dir-local ones) ?
--
ELS 2013, June 3/4, Madrid, Spain: http://els2013.european-lisp-symposium.org
Scientific site: http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com
This bug report was last modified 4 years and 304 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.