[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mode-line highlight
From: |
Masatake YAMATO |
Subject: |
Re: mode-line highlight |
Date: |
Thu, 16 Jun 2005 13:15:56 +0900 (JST) |
> 1 - move mouse to one of the minor modes names on the mode-line.
> press mouse-3 to get a menu of minor modes.
> cancel the menu by releasing outside of it (while keeping the mouse
> cursor pointing outside of any Emacs window): the mouse-face highlight
> will be turned back ON (on the spot where you orignally pressed
> mouse-3), even though the mouse is not in that area any more.
>
I think it is nothing to do with mouse-line.
Please eval following code at *scratch*; and do the same on [PRESS ME] on
your emacs with Lucid.
(easy-menu-define test-menu global-map
"Menu for `test-menu'."
'("Test"
["Gnus" gnus]
["Grep" grep]
))
(let ((b (goto-char (point-max)))
(e (progn (insert "[PRESS ME]") (point))))
(put-text-property b e
'mouse-face
'highlight)
(put-text-property b e
'local-map
(let ((kmap (make-sparse-keymap)))
(define-key kmap [down-mouse-3] (lambda ()
(interactive)
(popup-menu
test-menu)))
kmap)))
As Lute reported, emacs with Gtk+ behaves different way.
Ignoring this bug, I like the behavior of emacs with lucid; it shows the
association between a popup menu and its target item.
See smerge's popup menu behavior.
Masatake YAMATO