aboutsummaryrefslogtreecommitdiff
path: root/helpful.el
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2018-06-07 23:25:29 +0100
committerWilfred Hughes <me@wilfred.me.uk>2018-06-07 23:25:29 +0100
commitbd2a1f5bb52d8e2d2b3dc30ed8a66c9250ebafab (patch)
treefa2ef423ff0f900c469d416d6609443e39b27a85 /helpful.el
parent397185d21d0ecbb36fa7b13c77eb23d31c110df3 (diff)
Handle non-keymaps in minor-mode-map-alist robustly
Fixes #114
Diffstat (limited to 'helpful.el')
-rw-r--r--helpful.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/helpful.el b/helpful.el
index 8567941..df10ce0 100644
--- a/helpful.el
+++ b/helpful.el
@@ -1188,12 +1188,14 @@ same bindings as `global-map'."
(-map
(-lambda ((minor-mode . keymap))
;; Only consider this keymap if we didn't find it bound to a variable.
- (unless (memq keymap keymap-sym-vals)
+ (when (and (keymapp keymap)
+ (not (memq keymap keymap-sym-vals)))
(let ((key-sequences (helpful--key-sequences command-sym keymap)))
(when key-sequences
(push (cons (format "minor-mode-map-alist (%s)" minor-mode)
key-sequences)
matching-keymaps)))))
+ ;; TODO: examine `minor-mode-overriding-map-alist' too.
minor-mode-map-alist)
matching-keymaps))