magit-todos: supress the jT unbound warning
This commit is contained in:
parent
a0de3a9cf3
commit
a4e568a821
|
@ -39,6 +39,10 @@
|
||||||
(evil-collection-define-key 'normal 'magit-status-mode-map
|
(evil-collection-define-key 'normal 'magit-status-mode-map
|
||||||
"gT" (and (bound-and-true-p magit-todos-mode) 'magit-todos-jump-to-todos)))
|
"gT" (and (bound-and-true-p magit-todos-mode) 'magit-todos-jump-to-todos)))
|
||||||
|
|
||||||
|
(defun evil-collection-magit-todos-supress-warning (func &rest args)
|
||||||
|
"Supress the jT keybinding warning."
|
||||||
|
(cl-letf* (((symbol-function 'message) #'ignore))
|
||||||
|
(apply func args)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun evil-collection-magit-todos-setup ()
|
(defun evil-collection-magit-todos-setup ()
|
||||||
|
@ -50,6 +54,9 @@
|
||||||
(evil-collection-define-key nil 'magit-todos-item-section-map
|
(evil-collection-define-key nil 'magit-todos-item-section-map
|
||||||
"j" nil)
|
"j" nil)
|
||||||
|
|
||||||
|
;; No need to tell me that jT isn't bound
|
||||||
|
(advice-add 'magit-todos-mode :around 'evil-collection-magit-todos-supress-warning)
|
||||||
|
|
||||||
(add-hook 'magit-todos-mode-hook 'evil-collection-magit-todos-setup-jump-key))
|
(add-hook 'magit-todos-mode-hook 'evil-collection-magit-todos-setup-jump-key))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue