all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Didier Verna <didier@didierverna.net>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 13646@debbugs.gnu.org, viniciusjl@ig.com.br
Subject: bug#13646: mode-specific and file-regexp-specific settings
Date: Thu, 07 Feb 2013 17:56:13 +0100	[thread overview]
Message-ID: <m28v70m5aq.fsf@didierverna.net> (raw)
In-Reply-To: <jwvy5f0ce7i.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 07 Feb 2013 11:18:12 -0500")

Stefan Monnier <monnier@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





  reply	other threads:[~2013-02-07 16:56 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     ` bug#13646: mode-specific and file-regexp-specific settings Stefan Monnier
2013-02-07 16:56       ` Didier Verna [this message]
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=m28v70m5aq.fsf@didierverna.net \
    --to=didier@didierverna.net \
    --cc=13646@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --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.