Commit ee829a87 authored by Karl Heuer's avatar Karl Heuer
Browse files

(apropos-match-keys): Skip duplicate keybindings.

parent 9fc722de
...@@ -277,6 +277,9 @@ Returns list of symbols and documentation found." ...@@ -277,6 +277,9 @@ Returns list of symbols and documentation found."
(not (setq local (lookup-key current-local-map key))) (not (setq local (lookup-key current-local-map key)))
(numberp local) (numberp local)
(eq command local)) (eq command local))
;; check if this binding is already recorded
;; (this can happen due to inherited keymaps)
(not (member key (nthcdr 3 item)))
;; add this key binding to the item in alist ;; add this key binding to the item in alist
(nconc item (cons key nil)))) (nconc item (cons key nil))))
((vectorp (car map)) ((vectorp (car map))
...@@ -305,6 +308,9 @@ Returns list of symbols and documentation found." ...@@ -305,6 +308,9 @@ Returns list of symbols and documentation found."
(not (setq local (lookup-key current-local-map key))) (not (setq local (lookup-key current-local-map key)))
(numberp local) (numberp local)
(eq command local)) (eq command local))
;; check if this binding is already recorded
;; (this can happen due to inherited keymaps)
(not (member key (nthcdr 3 item)))
;; add this key binding to the item in alist ;; add this key binding to the item in alist
(nconc item (cons key nil))) (nconc item (cons key nil)))
(setq i (1+ i)))))) (setq i (1+ i))))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment