From eeb0aa2391f7f2057f62fc9723064f61eebaae48 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 17 Dec 2014 01:29:52 -0500 Subject: Replace a one-armed 'if' --- lisp/init-gnus.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lisp/init-gnus.el') diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el index d85cb91..cbbf2b8 100644 --- a/lisp/init-gnus.el +++ b/lisp/init-gnus.el @@ -159,13 +159,13 @@ A new buffer with the patch contents is opened in another window." (defun km/gnus-goto-message-in-notmuch () "Show message in notmuch." (interactive) - (if (and (memq major-mode '(gnus-summary-mode gnus-article-mode)) - (string= (cadr (gnus-find-method-for-group gnus-newsgroup-name)) - "dov")) - (let* ((header (with-current-buffer gnus-summary-buffer - (gnus-summary-article-header))) - (message-id (org-remove-angle-brackets (mail-header-id header)))) - (notmuch-show (concat "id:" message-id))))) + (when (and (memq major-mode '(gnus-summary-mode gnus-article-mode)) + (string= (cadr (gnus-find-method-for-group gnus-newsgroup-name)) + "dov")) + (let* ((header (with-current-buffer gnus-summary-buffer + (gnus-summary-article-header))) + (message-id (org-remove-angle-brackets (mail-header-id header)))) + (notmuch-show (concat "id:" message-id))))) (add-hook 'km/org-store-link-hook 'km/gnus-goto-message-in-notmuch) -- cgit v1.2.3