]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix namespacing issues in bind-key.el
authorStefan Kangas <stefankangas@gmail.com>
Thu, 8 Dec 2022 22:47:44 +0000 (23:47 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Thu, 8 Dec 2022 22:47:44 +0000 (23:47 +0100)
* lisp/use-package/bind-key.el (get-binding-description)
(compare-keybindings): Rename from this...
(bind-key--get-binding-description)
(bind-key--compare-keybindings): ...to this.

lisp/use-package/bind-key.el

index bbe3319d9bbad3aca022df72ec29e925111b188f..948b801e8dbcecbe79391d504f9f7f0a46e7800f 100644 (file)
@@ -445,7 +445,7 @@ This binds keys in such a way that bindings are not overridden by
 other modes.  See `override-global-mode'."
   (macroexp-progn (bind-keys-form args 'override-global-map)))
 
-(defun get-binding-description (elem)
+(defun bind-key--get-binding-description (elem)
   (cond
    ((listp elem)
     (cond
@@ -472,7 +472,7 @@ other modes.  See `override-global-mode'."
    (t
     "#<byte-compiled lambda>")))
 
-(defun compare-keybindings (l r)
+(defun bind-key--compare-keybindings (l r)
   (let* ((regex bind-key-segregation-regexp)
          (lgroup (and (string-match regex (caar l))
                       (match-string 0 (caar l))))
@@ -515,7 +515,7 @@ other modes.  See `override-global-mode'."
                (setq personal-keybindings
                      (sort personal-keybindings
                            (lambda (l r)
-                             (car (compare-keybindings l r))))))
+                             (car (bind-key--compare-keybindings l r))))))
 
         (if (not (eq (cdar last-binding) (cdar binding)))
             (princ (format "\n\n%s: %s\n%s\n\n"
@@ -523,7 +523,7 @@ other modes.  See `override-global-mode'."
                            (make-string (+ 21 (car bind-key-column-widths)
                                            (cdr bind-key-column-widths)) ?-)))
           (if (and last-binding
-                   (cdr (compare-keybindings last-binding binding)))
+                   (cdr (bind-key--compare-keybindings last-binding binding)))
               (princ "\n")))
 
         (let* ((key-name (caar binding))
@@ -532,10 +532,10 @@ other modes.  See `override-global-mode'."
                                        (read-kbd-macro key-name)))
                (command (nth 1 binding))
                (was-command (nth 2 binding))
-               (command-desc (get-binding-description command))
+               (command-desc (bind-key--get-binding-description command))
                (was-command-desc (and was-command
-                                      (get-binding-description was-command)))
-               (at-present-desc (get-binding-description at-present)))
+                                      (bind-key--get-binding-description was-command)))
+               (at-present-desc (bind-key--get-binding-description at-present)))
           (let ((line
                  (format
                   (format "%%-%ds%%-%ds%%s\n" (car bind-key-column-widths)
@@ -553,6 +553,11 @@ other modes.  See `override-global-mode'."
 
         (setq last-binding binding)))))
 
+(define-obsolete-function-alias 'get-binding-description
+  'bind-key--get-binding-description "30.1")
+(define-obsolete-function-alias 'compare-keybindings
+  'bind-key--compare-keybindings "30.1")
+
 (provide 'bind-key)
 
 ;; Local Variables: