aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-11-02 20:47:11 -0800
committerCarl Worth <cworth@cworth.org>2009-11-02 20:47:11 -0800
commit40382ed98cc0a801c5ecdde26088d4341e02bcde (patch)
tree9cd52ecbb580ef38f02eb6736cd04840c42281ab
parent8debf74e82c16890a033ea9008a993da0db1b99a (diff)
notmuch.el: Make 'n' and 'p' bring the current message to the top.
This is much more convenient for reading the messages, and happens to match the behavior of sup.
-rw-r--r--notmuch.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/notmuch.el b/notmuch.el
index 7fe5e978..9c3c1e06 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -51,7 +51,8 @@
(forward-char))
(if (not (re-search-forward notmuch-show-message-begin-regexp nil t))
(goto-char (point-max)))
- (beginning-of-line))
+ (beginning-of-line)
+ (recenter 0))
(defun notmuch-show-previous-message ()
"Advance point to the beginning of the previous message in the buffer."
@@ -60,9 +61,9 @@
(if (not (eobp))
(forward-char))
(if (not (re-search-backward notmuch-show-message-begin-regexp nil t))
- (progn
- (goto-char (point-min))
- (beginning-of-line))))
+ (goto-char (point-min)))
+ (beginning-of-line)
+ (recenter 0))
;;;###autoload
(defun notmuch-show-mode ()