From: Tassilo Horn <tassilo@member.fsf.org>
To: Daniel Colascione <danc@merrillprint.com>
Cc: Miles Bader <miles@gnu.org>,
dann@ics.uci.edu, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: turning on minor modes from hooks
Date: Mon, 31 Aug 2009 20:54:28 +0200 [thread overview]
Message-ID: <87my5foluj.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <200908311130.50238.danc@merrillprint.com> (Daniel Colascione's message of "Mon, 31 Aug 2009 11:30:50 -0400")
Daniel Colascione <danc@merrillprint.com> writes:
Hi!
>> A call with no arguments, as in (auto-save-mode), naturally ought to
>> toggle the mode or turn it on. But (auto-save-mode nil) has the
>> natural meaning of turning the mode off.
>>
>> Perhaps we could make minor mode functions take &rest arguments so
>> they can distinguish those two cases. However, that could be a
>> painful change,
>
> What about some kind of enable-minor-mode function?
That's what a some minor modes already do, for example
`turn-on-eldoc-mode', `turn-on-follow-mode', or
`turn-on-gnus-dired-mode'. For some of them there's also a turn-off
command.
Maybe that's a good convention. If so, then probably things like
`define-minor-mode' should generate those functions automatically.
BTW, for me the toggling has never been a problem. When I customize
some mode by putting stuff in its hook, I always define some
`th-foo-mode-init' function where I put stuff into. And then it makes
no difference in wether I write (some-minor-mode) or (some-minor-mode 1)
there. But I agree that it's a problem when customizing with the
`customize' interface...
Bye,
Tassilo
next prev parent reply other threads:[~2009-08-31 18:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-29 21:25 turning on minor modes from hooks Dan Nicolaescu
2009-08-29 23:18 ` Miles Bader
2009-08-30 0:14 ` Drew Adams
2009-08-30 2:11 ` Miles Bader
2009-08-30 3:01 ` Drew Adams
2009-08-30 3:58 ` Miles Bader
2009-08-30 3:59 ` Stefan Monnier
2009-08-30 4:00 ` Miles Bader
2009-08-31 3:33 ` Richard Stallman
2009-08-31 14:36 ` Stefan Monnier
2009-08-31 22:15 ` Miles Bader
2009-08-31 23:32 ` Stefan Monnier
2009-09-01 0:17 ` Miles Bader
2009-09-01 12:16 ` Richard Stallman
2009-09-01 16:19 ` Stefan Monnier
2009-09-01 21:20 ` Richard Stallman
2009-09-01 23:23 ` Stefan Monnier
2009-09-03 13:47 ` Richard Stallman
2009-09-04 21:23 ` Geoff Gole
2009-08-31 15:30 ` Daniel Colascione
2009-08-31 18:54 ` Tassilo Horn [this message]
2009-09-01 12:16 ` Richard Stallman
2009-08-31 23:43 ` Stefan Monnier
2009-09-01 2:07 ` Stephen J. Turnbull
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=87my5foluj.fsf@thinkpad.tsdh.de \
--to=tassilo@member.fsf.org \
--cc=danc@merrillprint.com \
--cc=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=rms@gnu.org \
/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.