]> git.eshelyaron.com Git - emacs.git/commitdiff
(apropos-match-keys): Skip duplicate keybindings.
authorKarl Heuer <kwzh@gnu.org>
Fri, 25 Mar 1994 03:03:24 +0000 (03:03 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 25 Mar 1994 03:03:24 +0000 (03:03 +0000)
lisp/apropos.el

index 53bbe1673b71f57a67bb0084af521cfb16467270..1cd37310e1c381578e47ea1e40bc60650b308677 100644 (file)
@@ -277,6 +277,9 @@ Returns list of symbols and documentation found."
                        (not (setq local (lookup-key current-local-map key)))
                        (numberp 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
                    (nconc item (cons key nil))))
              ((vectorp (car map))
@@ -305,6 +308,9 @@ Returns list of symbols and documentation found."
                            (not (setq local (lookup-key current-local-map key)))
                            (numberp 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
                        (nconc item (cons key nil)))
                   (setq i (1+ i))))))