all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Michal Nazarewicz <mina86@mina86.com>, emacs-devel@gnu.org
Subject: Re: [PATCH] font-core: add font-lock-{enable, disable}-global-for functions
Date: Mon, 05 Jan 2015 01:07:30 +0300	[thread overview]
Message-ID: <54A9B9A2.2020301@yandex.ru> (raw)
In-Reply-To: <jwvvbkm9w31.fsf-monnier+emacs@gnu.org>

On 01/04/2015 10:42 PM, Stefan Monnier wrote:

> But the redundancy is rather problematic

As long as one is for `customize-variable' and the other for elisp, I 
think it's good enough.

 > not to mention the fact that
> the semantics is unclear (e.g. how does it interact with derived modes?
> How does it interact with explicit calls in the mode hook? ...).

Right, these two aspects are not 100% transparent to a common user. 
Improving on either would be hard, though, if we want the derived modes 
sometimes to be affected (if we don't, that can just be documented).

> Maybe we should provide something like M-x customize-minor-mode-states RET
> which would collect the presence/absence of `foo-mode' or `(lambda ()
> (foo-mode N))' in all the hooks and let the user add/remove them from
> those hooks.

That might be handy.

But that wouldn't solve the "derived modes problem" any better than a 
docstring would (if it would, how?).

And scanning hooks for enabled/disabled modes would be necessarily 
imprecise: even if we take care of the three main variations 
(`foo-mode', (lambda () (foo-mode 1)), (lambda () (foo-mode -1))), that 
still leaves out random functions (lambdas or named) that include a 
`foo-mode' call among other code, that a more advanced user could have 
in their init file, or some yet-another package might include in their 
"initialize me" function.

If a function has been compiled, can we even scan its body for 
`foo-mode' calls?



  reply	other threads:[~2015-01-04 22:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-03 15:51 [PATCH] font-core: add font-lock-{enable, disable}-global-for functions Michal Nazarewicz
2015-01-04  2:27 ` Stefan Monnier
2015-01-04  3:21   ` Michal Nazarewicz
2015-01-04  4:30     ` Stefan Monnier
2015-01-04  6:07       ` Michal Nazarewicz
2015-01-04 13:39         ` Stefan Monnier
2015-01-04 14:18           ` Dmitry Gutov
2015-01-04 14:43             ` Michal Nazarewicz
2015-01-04 14:56               ` Dmitry Gutov
2015-01-04 19:42             ` Stefan Monnier
2015-01-04 22:07               ` Dmitry Gutov [this message]
2015-01-04 23:44                 ` Stefan Monnier
2015-01-05  0:02                   ` Dmitry Gutov
2015-01-05  0:08                     ` Dmitry Gutov
2015-01-05  1:49                     ` Stefan Monnier

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=54A9B9A2.2020301@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=mina86@mina86.com \
    --cc=monnier@iro.umontreal.ca \
    /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.