branch: elpa/bind-map commit 61fe55e0974cb8e1bdd4e230603eee832f7d5bcf Author: justbur <jus...@burkett.cc> Commit: justbur <jus...@burkett.cc>
Can't simply use cl-pushnew because it doesn't fully inspect the keymaps so you can't have two minor mode keymaps for the same minor-mode. Revert to push, understanding that we may get some duplication if the same form is called multiple times (should be rare) --- bind-map.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bind-map.el b/bind-map.el index 43da739940..5f0e35d538 100644 --- a/bind-map.el +++ b/bind-map.el @@ -80,8 +80,6 @@ ;;; Code: -(require 'cl-lib) - (defgroup bind-map nil "Bind personal keymaps in multiple locations." :group 'emacs) @@ -150,14 +148,13 @@ Declare a prefix command for MAP named COMMAND-NAME." (when ',minor-modes (defvar ,root-map-sym (make-sparse-keymap)) (dolist (mode ',minor-modes) - (cl-pushnew (cons mode ,root-map-sym) minor-mode-map-alist))) + (push (cons mode ,root-map-sym) minor-mode-map-alist))) (when ',major-modes (defvar ,root-map-sym (make-sparse-keymap)) (defvar ,major-mode-list '()) (defvar-local ,activate nil) - (cl-pushnew (cons ',activate ,root-map-sym) - minor-mode-map-alist) + (push (cons ',activate ,root-map-sym) minor-mode-map-alist) (setq ,major-mode-list (append ,major-mode-list ',major-modes)) (defun ,activate-func () (setq ,activate (not (null (member major-mode ,major-mode-list)))))