diff options
author | Karl Heuer <kwzh@gnu.org> | 1994-03-25 03:03:24 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1994-03-25 03:03:24 +0000 |
commit | ee829a877650ae3075d1de469cdc00503c5d340f (patch) | |
tree | cf76acc05c3c05f1b465604c7c7c9ed44dc14bb3 /lisp/apropos.el | |
parent | 9fc722dee15cb7544a9920f521911a35e6aa4700 (diff) | |
download | emacs-ee829a877650ae3075d1de469cdc00503c5d340f.tar.gz |
(apropos-match-keys): Skip duplicate keybindings.
Diffstat (limited to 'lisp/apropos.el')
-rw-r--r-- | lisp/apropos.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/apropos.el b/lisp/apropos.el index 53bbe1673b7..1cd37310e1c 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -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)))))) |