]> git.cworth.org Git - notmuch/blobdiff - notmuch.el
notmuch show: Switch to control character to mark sections of output
[notmuch] / notmuch.el
index 7fe5e9783cc0fdab735c6ea5f102a5b1068961e3..00a03c0ed7c1ea979f417ecc8a346b0a064bd2ef 100644 (file)
@@ -41,7 +41,7 @@
   "Keymap for \"notmuch show\" buffers.")
 (fset 'notmuch-show-mode-map notmuch-show-mode-map)
 
-(defvar notmuch-show-message-begin-regexp "%message{")
+(defvar notmuch-show-message-begin-regexp "\fmessage{")
 
 (defun notmuch-show-next-message ()
   "Advance point to the beginning of the next message in the buffer."
@@ -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 ()