Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
97b952b7
Commit
97b952b7
authored
Sep 17, 2009
by
Stefan Monnier
Browse files
(minor-mode-menu-from-indicator): Pay attention
to :minor-mode-function (bug#4455).
parent
f9af9719
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/mouse.el
lisp/mouse.el
+4
-3
No files found.
lisp/ChangeLog
View file @
97b952b7
2009-09-17 Stefan Monnier <monnier@iro.umontreal.ca>
* mouse.el (minor-mode-menu-from-indicator): Pay attention
to :minor-mode-function (bug#4455).
2009-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
* startup.el (command-line): Initialize the window-system after
...
...
lisp/mouse.el
View file @
97b952b7
...
...
@@ -158,7 +158,8 @@ items `Turn Off' and `Help'."
(
list
(
completing-read
"Minor mode indicator: "
(
describe-minor-mode-completion-table-for-indicator
))))
(
let
((
minor-mode
(
lookup-minor-mode-from-indicator
indicator
)))
(
let*
((
minor-mode
(
lookup-minor-mode-from-indicator
indicator
))
(
mm-fun
(
or
(
get
minor-mode
:minor-mode-function
)
minor-mode
)))
(
unless
minor-mode
(
error
"Cannot find minor mode for `%s'"
indicator
))
(
let*
((
map
(
cdr-safe
(
assq
minor-mode
minor-mode-map-alist
)))
(
menu
(
and
(
keymapp
map
)
(
lookup-key
map
[menu-bar]
))))
...
...
@@ -167,10 +168,10 @@ items `Turn Off' and `Help'."
(
mouse-menu-non-singleton
menu
)
`
(
keymap
,
indicator
(
turn-off
menu-item
"Turn Off minor mode"
,
m
inor-mode
)
(
turn-off
menu-item
"Turn Off minor mode"
,
m
m-fun
)
(
help
menu-item
"Help for minor mode"
(
lambda
()
(
interactive
)
(
describe-function
',m
inor-mode
))))))
(
describe-function
',m
m-fun
))))))
(
popup-menu
menu
))))
(
defun
mouse-minor-mode-menu
(
event
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment