[Top][All Lists]

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

loaded minor modes should be added to `mode-line-mode-menu' and Options

From: Drew Adams
Subject: loaded minor modes should be added to `mode-line-mode-menu' and Options menu
Date: Thu, 27 Sep 2007 15:52:07 -0700

1. Currently, predefined local minor modes are added to the minor-mode
`mouse-3' menu in the mode-line, and predefined global minor modes are added
to the menu-bar Options menu, some of them to submenu Show/Hide. The former
is done in bindings.el; the latter is done in menu-bar.el.

In both cases, the list of modes is hard-coded, static. This takes no
account of what minor modes the user might have defined (loaded).

It would be better for these menus to reflect the user's own context: to
show which minor modes have been defined, whether they were predefined as
part of Emacs or not. It makes at least as much sense for a user to be able
to access, by menu, the modes s?he actually uses as modes s?he might never

Instead of hard-coding the list of minor modes to include in these menus,
why not let `define-minor-mode', `define-global-minor-mode', and
`define-globalized-minor-mode' dynamically update the menus appropriately?
Then, if a library that defines a new minor mode is loaded, that mode will
be automatically added to the appropriate (local or global) menu (assuming
that one of those macros defines it).

In addition, the hard-coding of all this is repetitive - essentially the
same thing is done for each minor mode. It make sense to do this by
program - why not when the minor mode is defined?

2. The title of the mode-line menu for the local modes should be "Local
Minor Modes", not "Minor Modes".

reply via email to

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