[PATCH 1/3] Removed variable notmuch-hello-search-pos

Tomi Ollila tomi.ollila at iki.fi
Tue Apr 24 14:11:08 PDT 2012


From: Tomi Ollila <too at iki.fi>

Variable 'notmuch-hello-search-pos' was used to locate cursor to
the search bar in case no other location where to put it was known.
(In case search bar is shown -- if not cursor will be at the end
of buffer). More generic & versatile way to locace cursor follows. 

---
 emacs/notmuch-hello.el |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 71d37b8..8ae0aca 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -154,11 +154,6 @@ International Bureau of Weights and Measures."
 (defvar notmuch-hello-url "http://notmuchmail.org"
   "The `notmuch' web site.")
 
-(defvar notmuch-hello-search-pos nil
-  "Position of search widget, if any.
-
-This should only be set by `notmuch-hello-insert-search'.")
-
 (defvar notmuch-hello-custom-section-options
   '((:filter (string :tag "Filter for each tag"))
     (:filter-count (string :tag "Different filter to generate message counts"))
@@ -589,7 +584,6 @@ Complete list of currently available key bindings:
 (defun notmuch-hello-insert-search ()
   "Insert a search widget."
   (widget-insert "Search: ")
-  (setq notmuch-hello-search-pos (point-marker))
   (widget-create 'editable-field
 		 ;; Leave some space at the start and end of the
 		 ;; search boxes.
@@ -807,11 +801,8 @@ following:
       (when final-target-pos
 	(goto-char final-target-pos)
 	(unless (widget-at)
-	  (widget-forward 1)))
+	  (widget-forward 1)))))
 
-      (unless (widget-at)
-	(when notmuch-hello-search-pos
-	  (goto-char notmuch-hello-search-pos)))))
   (run-hooks 'notmuch-hello-refresh-hook)
   (setq notmuch-hello-first-run nil))
 
-- 
1.7.7.6



More information about the notmuch mailing list