changeset 44515:6eaf9e9d6f0b

(gnus-update-summary-mark-positions, gnus-summary-toggle-header): Don't assume point-min == 1.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 12 Apr 2002 03:16:01 +0000
parents 8bfbcb957964
children fed44101d33a
files lisp/gnus/gnus-sum.el
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/gnus-sum.el	Fri Apr 12 03:13:23 2002 +0000
+++ b/lisp/gnus/gnus-sum.el	Fri Apr 12 03:16:01 2002 +0000
@@ -2673,17 +2673,19 @@
 	   [0 "" "" "" "" "" 0 0 "" nil]  0 nil 128 t nil "" nil 1)
 	  (goto-char (point-min))
 	  (setq pos (list (cons 'unread (and (search-forward "\200" nil t)
-					     (- (point) 2)))))
+					     (- (point) (point-min) 1)))))
 	  (goto-char (point-min))
 	  (push (cons 'replied (and (search-forward "\201" nil t)
-				    (- (point) 2)))
+				    (- (point) (point-min) 1)))
 		pos)
 	  (goto-char (point-min))
-	  (push (cons 'score (and (search-forward "\202" nil t) (- (point) 2)))
+	  (push (cons 'score (and (search-forward "\202" nil t)
+				  (- (point) (point-min) 1)))
 		pos)
 	  (goto-char (point-min))
 	  (push (cons 'download
-		      (and (search-forward "\203" nil t) (- (point) 2)))
+		      (and (search-forward "\203" nil t)
+			   (- (point) (point-min) 1)))
 		pos)))
       (setq gnus-summary-mark-positions pos))))
 
@@ -7428,7 +7430,7 @@
     (save-restriction
       (let* ((buffer-read-only nil)
 	     (inhibit-point-motion-hooks t)
-	     hidden e)
+	     hidden s e)
 	(setq hidden
 	      (if (numberp arg)
 		  (>= arg 0)
@@ -7439,11 +7441,10 @@
 	(when (search-forward "\n\n" nil t)
 	  (delete-region (point-min) (1- (point))))
 	(goto-char (point-min))
-	(save-excursion
-	  (set-buffer gnus-original-article-buffer)
-	  (goto-char (point-min))
+	(with-current-buffer gnus-original-article-buffer
+	  (goto-char (setq s (point-min)))
 	  (setq e (1- (or (search-forward "\n\n" nil t) (point-max)))))
-	(insert-buffer-substring gnus-original-article-buffer 1 e)
+	(insert-buffer-substring gnus-original-article-buffer s e)
 	(save-restriction
 	  (narrow-to-region (point-min) (point))
 	  (article-decode-encoded-words)