Use gnus-article-before-search.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 4 Nov 2000 15:33:32 +0000 (15:33 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 4 Nov 2000 15:33:32 +0000 (15:33 +0000)
lisp/gnus-sum.el

index f220281..02bb809 100644 (file)
@@ -1093,6 +1093,8 @@ the type of the variable (string, integer, character, etc).")
 (defvar gnus-newsgroup-ephemeral-charset nil)
 (defvar gnus-newsgroup-ephemeral-ignored-charsets nil)
 
+(defvar gnus-article-before-search nil)
+
 (defconst gnus-summary-local-variables
   '(gnus-newsgroup-name
     gnus-newsgroup-begin gnus-newsgroup-end
@@ -7077,9 +7079,10 @@ If BACKWARD, search backward instead."
   (if (string-equal regexp "")
       (setq regexp (or gnus-last-search-regexp ""))
     (setq gnus-last-search-regexp regexp)
-    (setq gnus-last-article gnus-current-article))
+    (setq gnus-article-before-search gnus-current-article))
+  ;; Intentionally set gnus-last-article.
+  (setq gnus-last-article gnus-article-before-search)
   (let ((gnus-last-article gnus-last-article))
-    ;; Intentionally don't move the last article.
     (if (gnus-summary-search-article regexp backward)
        (gnus-summary-show-thread)
       (error "Search failed: \"%s\"" regexp))))