From a4e568a8219c915d9fea0c3168a219981cdc6cd0 Mon Sep 17 00:00:00 2001 From: condy Date: Thu, 18 Jun 2020 22:16:36 +0800 Subject: [PATCH] magit-todos: supress the jT unbound warning --- modes/magit-todos/evil-collection-magit-todos.el | 7 +++++++ 1 file changed, 7 insertions(+) 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))