summaryrefslogtreecommitdiff
path: root/modes/magit-todos
diff options
context:
space:
mode:
authorcondy <condy0919@gmail.com>2020-06-18 22:16:36 +0800
committerPierre Neidhardt <mail@ambrevar.xyz>2020-06-20 14:14:13 +0200
commita4e568a8219c915d9fea0c3168a219981cdc6cd0 (patch)
tree31fba0a7c6533099ea99d5b73c358c392819ea88 /modes/magit-todos
parenta0de3a9cf3d03a460d1880f0e2776ecbaa050ee1 (diff)
magit-todos: supress the jT unbound warning
Diffstat (limited to 'modes/magit-todos')
-rw-r--r--modes/magit-todos/evil-collection-magit-todos.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/modes/magit-todos/evil-collection-magit-todos.el b/modes/magit-todos/evil-collection-magit-todos.el
index 92959d7..e74ff9d 100644
--- a/modes/magit-todos/evil-collection-magit-todos.el
+++ b/modes/magit-todos/evil-collection-magit-todos.el
@@ -39,6 +39,10 @@
(evil-collection-define-key 'normal 'magit-status-mode-map
"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
(defun evil-collection-magit-todos-setup ()
@@ -50,6 +54,9 @@
(evil-collection-define-key nil 'magit-todos-item-section-map
"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))