emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bind-key 98fa02c521 07/13: Fix tests on Emacs 26 or old


From: ELPA Syncer
Subject: [elpa] externals/bind-key 98fa02c521 07/13: Fix tests on Emacs 26 or older
Date: Mon, 14 Nov 2022 15:57:21 -0500 (EST)

branch: externals/bind-key
commit 98fa02c5211167d1e1157b6f2d8fde1f1f876292
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    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.
---
 bind-key.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bind-key.el b/bind-key.el
index cca5ad8618..567ef9e4e8 100644
--- a/bind-key.el
+++ b/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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]