* FW: loaded minor modes should be added to `mode-line-mode-menu' andOptions menu
@ 2008-02-11 19:40 Drew Adams
2008-02-12 3:51 ` Richard Stallman
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2008-02-11 19:40 UTC (permalink / raw)
To: emacs-devel
Resending.
----
From: Drew Adams Sent: Thursday, September 27, 2007 3:52 PM
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
use.
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".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FW: loaded minor modes should be added to `mode-line-mode-menu' andOptions menu
2008-02-11 19:40 FW: loaded minor modes should be added to `mode-line-mode-menu' andOptions menu Drew Adams
@ 2008-02-12 3:51 ` Richard Stallman
2008-02-12 5:41 ` FW: loaded minor modes should be added to `mode-line-mode-menu'andOptions menu Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2008-02-12 3:51 UTC (permalink / raw)
To: Drew Adams; +Cc: emacs-devel
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
use.
That would make the menu of modes so large
it would be hard to use at all.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: FW: loaded minor modes should be added to `mode-line-mode-menu'andOptions menu
2008-02-12 3:51 ` Richard Stallman
@ 2008-02-12 5:41 ` Drew Adams
2008-02-12 17:44 ` Richard Stallman
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2008-02-12 5:41 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
> 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 use.
>
> That would make the menu of modes so large
> it would be hard to use at all.
Fair enough. But instead of doing such filtering via hard-coding in a
repetitive way, why not let `define-minor-mode', `define-global-minor-mode',
and `define-globalized-minor-mode' do it? Let them accept an argument,
keyword or some other indication (e.g. lighter text prefix, just as we use *
and such for doc strings and for `interactive') to decide whether to add to
a menu.
IOW, on the spectrum from hand- and hard-coded to blindly and automatically
added, pick something systematic but manageable that's midway.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-12 17:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 19:40 FW: loaded minor modes should be added to `mode-line-mode-menu' andOptions menu Drew Adams
2008-02-12 3:51 ` Richard Stallman
2008-02-12 5:41 ` FW: loaded minor modes should be added to `mode-line-mode-menu'andOptions menu Drew Adams
2008-02-12 17:44 ` Richard Stallman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).