summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerry Agbobada <10496163+gagbo@users.noreply.github.com>2020-12-24 17:47:20 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2020-12-27 10:57:01 +0000
commit16e14ea9c58aa1224c09d02e40ad3edde72c820a (patch)
treee1c02b767915e0443e1ea49bd03b99c107dcd8f6
parent92c8002214aca79ff0faf9be45eace3c411d166b (diff)
Put notmuch-common-keymap last
Since all the other maps in `evil-collection-notmuch-maps` have notmuch-common-keymap as parent https://git.notmuchmail.org/git?p=notmuch;a=blob;f=emacs/notmuch-hello.el;h=fa31694ff0f79a7f2781849394390a673f75aade;hb=HEAD#l651 When `evil-collection-setup-hook` runs, if it changes keymaps using a `dolist` over `evil-collection-notmuch-maps`, then a binding might see 2 changes at once. See discussion here https://github.com/hlissner/doom-emacs/pull/4403#issuecomment-750907188
-rw-r--r--modes/notmuch/evil-collection-notmuch.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/modes/notmuch/evil-collection-notmuch.el b/modes/notmuch/evil-collection-notmuch.el
index ad70dfb..0151396 100644
--- a/modes/notmuch/evil-collection-notmuch.el
+++ b/modes/notmuch/evil-collection-notmuch.el
@@ -36,13 +36,20 @@
(declare-function notmuch-search-tag "notmuch")
(declare-function notmuch-tree-tag "notmuch-tree")
-(defconst evil-collection-notmuch-maps '(notmuch-common-keymap
- notmuch-hello-mode-map
+;; Since all the other maps in `evil-collection-notmuch-maps`
+;; have notmuch-common-keymap as parent
+;; https://git.notmuchmail.org/git?p=notmuch;a=blob;f=emacs/notmuch-hello.el;h=fa31694ff0f79a7f2781849394390a673f75aade;hb=HEAD#l651
+;;
+;; When `evil-collection-setup-hook` runs, if it changes keymaps
+;; using a `dolist` over `evil-collection-notmuch-maps`, then a binding might
+;; see 2 changes at once. To avoid that, notmuch-common-keymap is last
+(defconst evil-collection-notmuch-maps '(notmuch-hello-mode-map
notmuch-show-mode-map
notmuch-show-part-map
notmuch-tree-mode-map
notmuch-search-mode-map
- notmuch-search-stash-map))
+ notmuch-search-stash-map
+ notmuch-common-keymap))
(defun evil-collection-notmuch-toggle-tag (tag mode &optional next-function)
"Toggle TAG tag for message in MODE."