diff options
| author | Stefan Kangas | 2022-11-13 23:16:05 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2022-11-13 23:26:44 +0100 |
| commit | 45e6ee1371bdfec607aaf0b5be2b340460f704db (patch) | |
| tree | ffd874b7b44890046e09b43817557ca195ff7b4c | |
| parent | 6b25a41bc6a751618fc4f86c76104093bc19d77e (diff) | |
| download | emacs-45e6ee1371bdfec607aaf0b5be2b340460f704db.tar.gz 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.
| -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." | |||
| 223 | In contrast to `define-key', this function removes the binding from the keymap." | 223 | In contrast to `define-key', this function removes the binding from the keymap." |
| 224 | (define-key keymap key nil) | 224 | (define-key keymap key nil) |
| 225 | ;; Split M-key in ESC key | 225 | ;; Split M-key in ESC key |
| 226 | (setq key (mapcan (lambda (k) | 226 | (setq key (cl-mapcan (lambda (k) |
| 227 | (if (and (integerp k) (/= (logand k ?\M-\0) 0)) | 227 | (if (and (integerp k) (/= (logand k ?\M-\0) 0)) |
| 228 | (list ?\e (logxor k ?\M-\0)) | 228 | (list ?\e (logxor k ?\M-\0)) |
| 229 | (list k))) | 229 | (list k))) |
| 230 | key)) | 230 | key)) |
| 231 | ;; Delete single keys directly | 231 | ;; Delete single keys directly |
| 232 | (if (= (length key) 1) | 232 | (if (= (length key) 1) |
| 233 | (delete key keymap) | 233 | (delete key keymap) |
| @@ -241,7 +241,7 @@ In contrast to `define-key', this function removes the binding from the keymap." | |||
| 241 | (delete (last key) submap) | 241 | (delete (last key) submap) |
| 242 | ;; Delete submap if it is empty | 242 | ;; Delete submap if it is empty |
| 243 | (when (= 1 (length submap)) | 243 | (when (= 1 (length submap)) |
| 244 | (bind-key--remove prefix keymap))))) | 244 | (bind-key--remove prefix keymap))))) |
| 245 | 245 | ||
| 246 | ;;;###autoload | 246 | ;;;###autoload |
| 247 | (defmacro bind-key* (key-name command &optional predicate) | 247 | (defmacro bind-key* (key-name command &optional predicate) |