emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: `define-globalized-minor-mode': why the need for a separate TURN-ON


From: Drew Adams
Subject: RE: `define-globalized-minor-mode': why the need for a separate TURN-ON function?
Date: Sat, 7 Apr 2012 07:45:00 -0700

> > 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 via email to

[Prev in Thread] Current Thread [Next in Thread]