diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-11-13 23:16:05 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-11-13 23:26:44 +0100 |
commit | 45e6ee1371bdfec607aaf0b5be2b340460f704db (patch) | |
tree | ffd874b7b44890046e09b43817557ca195ff7b4c /lisp/use-package/bind-key.el | |
parent | 6b25a41bc6a751618fc4f86c76104093bc19d77e (diff) | |
download | emacs-45e6ee1371bdfec607aaf0b5be2b340460f704db.tar.gz emacs-45e6ee1371bdfec607aaf0b5be2b340460f704db.tar.bz2 emacs-45e6ee1371bdfec607aaf0b5be2b340460f704db.zip |
Fix tests on Emacs 26 or older
This fixes the following error in Emacs 25.3:
In toplevel form:
bind-key.el:549:1:Error: the function ‘mapcan’ is not known to be defined.
Diffstat (limited to 'lisp/use-package/bind-key.el')
-rw-r--r-- | lisp/use-package/bind-key.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el index cca5ad86187..567ef9e4e85 100644 --- a/lisp/use-package/bind-key.el +++ b/lisp/use-package/bind-key.el @@ -223,11 +223,11 @@ See `bind-key' for more details." In contrast to `define-key', this function removes the binding from the keymap." (define-key keymap key nil) ;; Split M-key in ESC key - (setq key (mapcan (lambda (k) - (if (and (integerp k) (/= (logand k ?\M-\0) 0)) - (list ?\e (logxor k ?\M-\0)) - (list k))) - key)) + (setq key (cl-mapcan (lambda (k) + (if (and (integerp k) (/= (logand k ?\M-\0) 0)) + (list ?\e (logxor k ?\M-\0)) + (list k))) + key)) ;; Delete single keys directly (if (= (length key) 1) (delete key keymap) @@ -241,7 +241,7 @@ In contrast to `define-key', this function removes the binding from the keymap." (delete (last key) submap) ;; Delete submap if it is empty (when (= 1 (length submap)) - (bind-key--remove prefix keymap))))) + (bind-key--remove prefix keymap))))) ;;;###autoload (defmacro bind-key* (key-name command &optional predicate) |