mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 10:58:10 +01:00
emacs: hello: fix accidental modification of widget-keymap
In emacs24 we use make-composed-keymap. It seems that if only a single map is specified then emacs just resuses it rather than creating a copy of it. Thus use make-sparse-keymap to force a copy.
This commit is contained in:
parent
1432a4f946
commit
3270eea39f
1 changed files with 6 additions and 2 deletions
|
@ -652,8 +652,12 @@ with `notmuch-hello-query-counts'."
|
||||||
|
|
||||||
(defvar notmuch-hello-mode-map
|
(defvar notmuch-hello-mode-map
|
||||||
(let ((map (if (fboundp 'make-composed-keymap)
|
(let ((map (if (fboundp 'make-composed-keymap)
|
||||||
;; Inherit both widget-keymap and notmuch-common-keymap
|
;; Inherit both widget-keymap and
|
||||||
(make-composed-keymap widget-keymap)
|
;; notmuch-common-keymap. We have to use
|
||||||
|
;; make-sparse-keymap to force this to be a new
|
||||||
|
;; keymap (so that when we modify map it does not
|
||||||
|
;; modify widget-keymap).
|
||||||
|
(make-composed-keymap (list (make-sparse-keymap) widget-keymap))
|
||||||
;; Before Emacs 24, keymaps didn't support multiple
|
;; Before Emacs 24, keymaps didn't support multiple
|
||||||
;; inheritance,, so just copy the widget keymap since
|
;; inheritance,, so just copy the widget keymap since
|
||||||
;; it's unlikely to change.
|
;; it's unlikely to change.
|
||||||
|
|
Loading…
Reference in a new issue