]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Remove non-interactive call of goto-line
authorCarl Worth <cworth@cworth.org>
Thu, 28 Oct 2010 00:58:19 +0000 (17:58 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 28 Oct 2010 00:58:19 +0000 (17:58 -0700)
As the emacs compiler warns, the goto-line function is only intended for
interactive use. Instead use the approach recommended in the goto-line
documentation to avoid this.

emacs/notmuch.el

index 8d69fc8751082b12fedea6e042c066e33f9b77a2..ff9b519b2d6052cf52d68b825b48ed7946653f1a 100644 (file)
@@ -575,9 +575,10 @@ This function advances the next thread when finished."
                        (if (and atbob
                                 (not (string= notmuch-search-target-thread "found")))
                            (set 'never-found-target-thread t))))))
-             (if (and never-found-target-thread
+             (when (and never-found-target-thread
                       notmuch-search-target-line)
-                 (goto-line notmuch-search-target-line)))))))
+                 (goto-char (point-min))
+                 (forward-line (1- notmuch-search-target-line))))))))
 
 (defcustom notmuch-search-line-faces nil
   "Tag/face mapping for line highlighting in notmuch-search.