emacs-devel
[Top][All Lists]
Advanced

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

RE: mouse-1 on minor-mode lighter in mode line could bring up the minorm


From: Drew Adams
Subject: RE: mouse-1 on minor-mode lighter in mode line could bring up the minormode's menu
Date: Sun, 5 Nov 2006 11:37:31 -0800

> From: Richard Stallman
>     Mouse-1 on a minor-mode lighter in the mode line does nothing
>     special - it just runs `mouse-drag-mode-line'. When a minor
>     mode has its own menu
>
> What does that mean -- for a minor mode to "have its own menu"?

For example:

(let ((map (make-sparse-keymap "Foo")))
  (define-key foo-mode-map [menu-bar] (make-sparse-keymap))
  (define-key foo-mode-map [menu-bar foo] (cons "Foo" map))
  (define-key map [foo1] '("Foo 1" . foo1))
  ...)

When minor mode foo is enabled (not shown), menu Foo would be added to the
menu-bar. Menu Foo could also be used as a popup on the Foo lighter in the
mode-line. This would provide the same behavior we have now for major modes
(e.g. Info).





reply via email to

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