mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 19:59:38 +00:00
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.
This commit is contained in:
parent
6b25a41bc6
commit
45e6ee1371
1 changed files with 6 additions and 6 deletions
|
@ -223,11 +223,11 @@ See `bind-key' for more details."
|
||||||
In contrast to `define-key', this function removes the binding from the keymap."
|
In contrast to `define-key', this function removes the binding from the keymap."
|
||||||
(define-key keymap key nil)
|
(define-key keymap key nil)
|
||||||
;; Split M-key in ESC key
|
;; Split M-key in ESC key
|
||||||
(setq key (mapcan (lambda (k)
|
(setq key (cl-mapcan (lambda (k)
|
||||||
(if (and (integerp k) (/= (logand k ?\M-\0) 0))
|
(if (and (integerp k) (/= (logand k ?\M-\0) 0))
|
||||||
(list ?\e (logxor k ?\M-\0))
|
(list ?\e (logxor k ?\M-\0))
|
||||||
(list k)))
|
(list k)))
|
||||||
key))
|
key))
|
||||||
;; Delete single keys directly
|
;; Delete single keys directly
|
||||||
(if (= (length key) 1)
|
(if (= (length key) 1)
|
||||||
(delete key keymap)
|
(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 (last key) submap)
|
||||||
;; Delete submap if it is empty
|
;; Delete submap if it is empty
|
||||||
(when (= 1 (length submap))
|
(when (= 1 (length submap))
|
||||||
(bind-key--remove prefix keymap)))))
|
(bind-key--remove prefix keymap)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defmacro bind-key* (key-name command &optional predicate)
|
(defmacro bind-key* (key-name command &optional predicate)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue