From 2dcd1e7234f9dd50ec41c7b09297f002c6572a86 Mon Sep 17 00:00:00 2001 From: Pieter Praet Date: Wed, 1 Feb 2012 14:50:00 +0100 Subject: emacs: globally replace non-branching "(if COND (progn ..." with "(when ..." Less code, same results, without sacrificing readability. --- emacs/notmuch-show.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'emacs/notmuch-show.el') diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index de9421e8..0a945ea0 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1364,11 +1364,10 @@ any effects from previous calls to ;; If a small number of lines from the previous message are ;; visible, realign so that the top of the current message is at ;; the top of the screen. - (if (<= (count-screen-lines (window-start) start-of-message) - next-screen-context-lines) - (progn - (goto-char (notmuch-show-message-top)) - (notmuch-show-message-adjust))) + (when (<= (count-screen-lines (window-start) start-of-message) + next-screen-context-lines) + (goto-char (notmuch-show-message-top)) + (notmuch-show-message-adjust)) ;; Move to the top left of the window. (goto-char (window-start))) (t -- cgit v1.2.3