[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 30b0debaaa: Don't use keymap-set and keymap-loo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 30b0debaaa: Don't use keymap-set and keymap-lookup in autoloaded code |
Date: |
Wed, 15 Feb 2023 05:59:24 -0500 (EST) |
branch: elpa/git-commit
commit 30b0debaaadadec6103a8d7eab92322fd9d30a15
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Don't use keymap-set and keymap-lookup in autoloaded code
Fixes #4878.
---
lisp/magit.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/magit.el b/lisp/magit.el
index 0f49dab8ef..9a3257174b 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -302,6 +302,8 @@ Also see info node `(magit)Commands for Buffers Visiting
Files'."
:group 'magit-essentials
:type 'boolean)
+;; This is autoloaded and thus is used before `compat' is
+;; loaded, so we cannot use `keymap-lookup' and `keymap-set'.
;;;###autoload
(progn
(defun magit-maybe-define-global-key-bindings (&optional force)
@@ -312,9 +314,9 @@ Also see info node `(magit)Commands for Buffers Visiting
Files'."
("C-x M-g" . magit-dispatch)
("C-c M-g" . magit-file-dispatch)))
(when (or force
- (not (or (keymap-lookup map key)
+ (not (or (lookup-key map (kbd key))
(where-is-internal def (make-sparse-keymap) t))))
- (keymap-set map key def))))))
+ (define-key map (kbd key) def))))))
(if after-init-time
(magit-maybe-define-global-key-bindings)
(add-hook 'after-init-hook #'magit-maybe-define-global-key-bindings t)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/git-commit 30b0debaaa: Don't use keymap-set and keymap-lookup in autoloaded code,
ELPA Syncer <=