[Top][All Lists]

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

Re: /etc/TODO: define-minor-mode & minor-mode-list

From: William Stevenson
Subject: Re: /etc/TODO: define-minor-mode & minor-mode-list
Date: Wed, 01 Feb 2012 02:46:24 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Juanma Barranquero <address@hidden> writes:

> On Wed, Feb 1, 2012 at 03:05, William Stevenson <address@hidden> 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.

reply via email to

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