summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-10-27 17:58:19 -0700
committerCarl Worth <cworth@cworth.org>2010-10-27 17:58:19 -0700
commit75f703e7c2fe33920342c1bc534d19935c1e3513 (patch)
tree778d6bc3037e8474e46635ddae0d5ede4e3acaf4
parent4ddb5ab4dd42208ba24989f188bdd06ab7865b5e (diff)
emacs: Remove non-interactive call of goto-line
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.
-rw-r--r--emacs/notmuch.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 8d69fc8..ff9b519 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -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.