aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-show.el
diff options
context:
space:
mode:
authorGravatar Pieter Praet <pieter@praet.org>2012-01-16 11:56:40 +0100
committerGravatar David Bremner <bremner@debian.org>2012-01-21 08:17:56 -0400
commit046f5dded2a113d80e55288aaa1659a6843dafa3 (patch)
tree1fabcced2607cf113d3d6e46561956301cba7312 /emacs/notmuch-show.el
parenta56e6603c604cbe010a520c9084e0ad2895755d9 (diff)
emacs: globally replace non-branching "(if (not ..." with "(unless ..."
Less code, same results, without sacrificing readability.
Diffstat (limited to 'emacs/notmuch-show.el')
-rw-r--r--emacs/notmuch-show.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index fc134627..92d3811c 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -662,8 +662,8 @@ current buffer, if possible."
;; part, so we make sure that we're down at the end.
(goto-char (point-max))
;; Ensure that the part ends with a carriage return.
- (if (not (bolp))
- (insert "\n")))
+ (unless (bolp)
+ (insert "\n")))
(defun notmuch-show-insert-body (msg body depth)
"Insert the body BODY at depth DEPTH in the current thread."
@@ -743,8 +743,8 @@ current buffer, if possible."
(setq body-start (point-marker))
(notmuch-show-insert-body msg (plist-get msg :body) depth)
;; Ensure that the body ends with a newline.
- (if (not (bolp))
- (insert "\n"))
+ (unless (bolp)
+ (insert "\n"))
(setq body-end (point-marker))
(setq content-end (point-marker))
@@ -885,8 +885,8 @@ buffer."
(run-hooks 'notmuch-show-hook))
;; Move straight to the first open message
- (if (not (notmuch-show-message-visible-p))
- (notmuch-show-next-open-message))
+ (unless (notmuch-show-message-visible-p)
+ (notmuch-show-next-open-message))
;; Set the header line to the subject of the first open message.
(setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))