summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-12-17 01:29:52 -0500
committerKyle Meyer <kyle@kyleam.com>2014-12-17 01:29:52 -0500
commiteeb0aa2391f7f2057f62fc9723064f61eebaae48 (patch)
treec6eed941f078579043cbdca50d8cedfedd6b56b1 /lisp
parent2ff68140ef7a3a56aea318ad794a636bc9ed8abf (diff)
downloademacs.d-eeb0aa2391f7f2057f62fc9723064f61eebaae48.tar.gz
Replace a one-armed 'if'
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-gnus.el14
1 files changed, 7 insertions, 7 deletions
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)