emacs-devel
[Top][All Lists]
Advanced

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

RE: minor mode map question


From: Drew Adams
Subject: RE: minor mode map question
Date: Sun, 31 Dec 2006 18:15:26 -0800

Got no response to my previous email on this, but I figured things out.

FYI - The problem was that although the minor-mode map was updated each time
the mode was entered, this was not reflected in `minor-mode-map-alist' -
that alist continued to have the old keymap. The solution was to delete and
re-create the minor-mode entry in `minor-mode-map-alist' each time the mode
is entered. That ensures that `substitute-key-definition' respects the
current global map, and that is reflected in the minor-mode map.

I wish that you could provide, as the cdr of an entry to
`minor-mode-map-alist', an expression to be evaled to a keymap value, or
perhaps a function that is called to return a keymap value. That would
obviate needing to delete and re-add an entry, just to ensure that the alist
is up-to-date whenever the keymap changes. It seems a bit weird to me that
`minor-mode-map-alist' is so static, given how dynamic Emacs is otherwise.
Why not use a keymap-valued variable or keymap-returning function here,
instead of an actual keymap?





reply via email to

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