all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: RE: `define-globalized-minor-mode': why the need for a separate TURN-ON function?
Date: Sat, 7 Apr 2012 07:45:00 -0700	[thread overview]
Message-ID: <DE7D1B10978B4696A5058F07E370EC09@us.oracle.com> (raw)
In-Reply-To: <jwv1uo0fb8m.fsf-monnier+emacs@gnu.org>

> > why for `define-globalized-minor-mode' must one
> > define a separate TURN-ON function to turn the mode on, but 
> > using the (local) minor-mode function suffices to turn it off?
> 
> As the docstring says: "try to turn MODE on if applicable for that
> buffer".  That's different to MODE itself which should turn 
> it in if at all possible.

I see; thanks.  The "for that buffer" qualification did not jump out at me,
especially since the local mode already presumably does its thing for the
specific buffer where it is turned on.  The difference is that in the local case
it is the user who decides whether the mode makes sense and can be turned "for
that buffer".  In the global case it is the command that must decide separately,
for each buffer.

I understand now, but this was not at all obvious (to me) from just that 3-word
qualification.  You might want to make this distinction a bit more obvious in
the doc.  Perhaps say what you just said here, or add a brief example where the
distinction makes sense.




      reply	other threads:[~2012-04-07 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05 15:44 `define-globalized-minor-mode': why the need for a separate TURN-ON function? Drew Adams
2012-04-07  3:56 ` Stefan Monnier
2012-04-07 14:45   ` Drew Adams [this message]

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=DE7D1B10978B4696A5058F07E370EC09@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --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.