GNU bug report logs - #13646
Mode-specific and file-regexp-specific settings

Previous Next

Package: emacs;

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


Message #14 received at 13646 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Didier Verna <didier <at> didierverna.net>
Cc: 13646 <at> debbugs.gnu.org, viniciusjl <at> ig.com.br
Subject: mode-specific and file-regexp-specific settings
Date: Thu, 07 Feb 2013 11:18:12 -0500
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




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.