From: William Stevenson <yhvh2000@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: /etc/TODO: define-minor-mode & minor-mode-list
Date: Wed, 01 Feb 2012 02:46:24 +0000 [thread overview]
Message-ID: <8739avfeyn.fsf@gmail.com> (raw)
In-Reply-To: CAAeL0SQ0e2x4m7c83d5HO8CwWyEcJUhUzFWrM66c0Jmh0=c1tA@mail.gmail.com
Juanma Barranquero <lekktu@gmail.com> writes:
> On Wed, Feb 1, 2012 at 03:05, William Stevenson <yhvh2000@gmail.com> wrote:
>
>> I'm confused about minor-mode-list. Why are some minor-modes added in
>> the definition even though they are defined with define-minor-mode?
>
> Likely because these minor modes were converted to use
> define-minor-mode, but not removed from minor-mode-list.
>
>> I also found that abbrev-mode remained in the list if it was removed
>> from this definition.
>
> define-minor-mode (conditionally) calls add-minor-mode, which does
>
> (unless (memq toggle minor-mode-list)
> (push toggle minor-mode-list))
>
> so minor modes defined with define-minor-mode will end in the list.
> For preloaded minor modes, that's already so:
>
> emacs -Q --batch --eval "(princ (length minor-mode-list))" => 30
Sorry, I didn't explain clearly. I found that abbrev-mode was the _only_
mode that could be removed from the definition and still end up in the
list. And my confusion arose from my inability to see what caused this
when all 5 of these modes are defined using define-minor-mode.
For example:
(defvar minor-mode-list '()
"List of all minor mode functions.")
emacs -Q --batch --eval "(princ (length minor-mode-list))" => 25
>> Also is this todo considered todone?
>
> There are 300+ instances of "(defun .*-mode " in the sources. Not all
> are really modes, and many are major modes, but surely there are still
> unconverted minor modes.
Thanks for your reply, I will do a thorough search.
next prev parent reply other threads:[~2012-02-01 2:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 2:05 /etc/TODO: define-minor-mode & minor-mode-list William Stevenson
2012-02-01 2:32 ` Juanma Barranquero
2012-02-01 2:46 ` William Stevenson [this message]
2012-02-01 3:39 ` Juanma Barranquero
2012-02-01 3:14 ` Chong Yidong
2012-02-01 14:06 ` Stefan Monnier
2012-02-01 14:53 ` Juanma Barranquero
2012-02-01 15:14 ` Stefan Monnier
2012-02-02 0:56 ` Juri Linkov
2012-02-02 6:57 ` William Stevenson
2012-02-02 18:40 ` Stefan Monnier
2012-02-02 21:14 ` Juri Linkov
2012-02-04 13:49 ` Johan Bockgård
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=8739avfeyn.fsf@gmail.com \
--to=yhvh2000@gmail.com \
--cc=emacs-devel@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.