[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit da1815172f: magit-maybe-define-global-key-bindi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit da1815172f: magit-maybe-define-global-key-bindings: Add force argument |
Date: |
Sat, 19 Mar 2022 06:58:11 -0400 (EDT) |
branch: elpa/git-commit
commit da1815172fca35985b71cc75c42050aa4b5130f4
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit-maybe-define-global-key-bindings: Add force argument
Closes #4632.
---
lisp/magit.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/magit.el b/lisp/magit.el
index 3b6411caae..e6696d09e2 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -276,7 +276,7 @@ Also see info node `(magit)Commands for Buffers Visiting
Files'."
;;;###autoload
(progn
- (defun magit-maybe-define-global-key-bindings ()
+ (defun magit-maybe-define-global-key-bindings (&optional force)
(when magit-define-global-key-bindings
(let ((map (current-global-map)))
(dolist (elt '(("C-x g" . magit-status)
@@ -284,8 +284,9 @@ Also see info node `(magit)Commands for Buffers Visiting
Files'."
("C-c M-g" . magit-file-dispatch)))
(let ((key (kbd (car elt)))
(def (cdr elt)))
- (unless (or (lookup-key map key)
- (where-is-internal def (make-sparse-keymap) t))
+ (when (or force
+ (not (or (lookup-key map key)
+ (where-is-internal def (make-sparse-keymap)
t))))
(define-key map key def)))))))
(if after-init-time
(magit-maybe-define-global-key-bindings)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/git-commit da1815172f: magit-maybe-define-global-key-bindings: Add force argument,
ELPA Syncer <=