From 046f5dded2a113d80e55288aaa1659a6843dafa3 Mon Sep 17 00:00:00 2001 From: Pieter Praet Date: Mon, 16 Jan 2012 11:56:40 +0100 Subject: emacs: globally replace non-branching "(if (not ..." with "(unless ..." Less code, same results, without sacrificing readability. --- emacs/notmuch.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'emacs/notmuch.el') diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 3602361b..da75fafc 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -651,8 +651,8 @@ This function advances the next thread when finished." (if notmuch-search-process-filter-data (insert (concat "Error: Unexpected output from notmuch search:\n" notmuch-search-process-filter-data))) (insert "End of search results.") - (if (not (= exit-status 0)) - (insert (format " (process returned %d)" exit-status))) + (unless (= exit-status 0) + (insert (format " (process returned %d)" exit-status))) (insert "\n") (if (and atbob (not (string= notmuch-search-target-thread "found"))) @@ -1022,8 +1022,8 @@ Invokes `notmuch-poll-script', \"notmuch new\", or does nothing depending on the value of `notmuch-poll-script'." (interactive) (if (stringp notmuch-poll-script) - (if (not (string= notmuch-poll-script "")) - (call-process notmuch-poll-script nil nil)) + (unless (string= notmuch-poll-script "") + (call-process notmuch-poll-script nil nil)) (call-process notmuch-command nil nil nil "new"))) (defun notmuch-search-poll-and-refresh-view () -- cgit v1.2.3