notmuch.el: Use emacs built-in forward-button and backward-button
authorKan-Ru Chen <kanru@kanru.info>
Tue, 1 Dec 2009 06:13:53 +0000 (14:13 +0800)
committerCarl Worth <cworth@cworth.org>
Fri, 5 Feb 2010 19:31:38 +0000 (11:31 -0800)
There are built-ins, so why not use them?

Signed-off-by: Kan-Ru Chen <kanru@kanru.info>
notmuch.el

index c2e0899e5c8e7a1787c179439a530a6952127423..5ef38ce589f70aa93b42b13c2a426c635efbe4c8 100644 (file)
@@ -564,12 +564,12 @@ which this thread was originally shown."
 (defun notmuch-show-next-button ()
   "Advance point to the next button in the buffer."
   (interactive)
-  (goto-char (button-start (next-button (point)))))
+  (forward-button 1))
 
 (defun notmuch-show-previous-button ()
   "Move point back to the previous button in the buffer."
   (interactive)
-  (goto-char (button-start (previous-button (point)))))
+  (backward-button 1))
 
 (defun notmuch-toggle-invisible-action (cite-button)
   (let ((invis-spec (button-get cite-button 'invisibility-spec)))