2002-04-11 Stefan Monnier <monnier@cs.yale.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 12 Apr 2002 11:51:01 +0000 (11:51 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 12 Apr 2002 11:51:01 +0000 (11:51 +0000)
* gnus-sum.el (gnus-update-summary-mark-positions)
(gnus-summary-toggle-header):
* gnus-uu.el (gnus-uu-binhex-article, gnus-uu-reginize-string)
(gnus-uu-expand-numbers, gnus-uu-post-make-mime)
(gnus-uu-post-encoded):
* nnfolder.el (nnfolder-possibly-change-group):
* nnimap.el (nnimap-retrieve-headers):
* nnmbox.el (nnmbox-create-mbox): Don't assume point-min == 1.

2002-04-08  Stefan Monnier  <monnier@cs.yale.edu>

* nnml.el (nnml-save-nov, nnml-generate-nov-file):
* pop3.el (pop3-md5): Don't hardcode point-min == 1.

lisp/ChangeLog
lisp/gnus-ems.el
lisp/gnus-sum.el
lisp/gnus-uu.el
lisp/nnfolder.el
lisp/nnimap.el
lisp/nnmbox.el
lisp/nnml.el
lisp/pop3.el

index 5445b16..c03145a 100644 (file)
@@ -1,3 +1,19 @@
+2002-04-11  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * gnus-sum.el (gnus-update-summary-mark-positions)
+       (gnus-summary-toggle-header):
+       * gnus-uu.el (gnus-uu-binhex-article, gnus-uu-reginize-string)
+       (gnus-uu-expand-numbers, gnus-uu-post-make-mime)
+       (gnus-uu-post-encoded):
+       * nnfolder.el (nnfolder-possibly-change-group):
+       * nnimap.el (nnimap-retrieve-headers):
+       * nnmbox.el (nnmbox-create-mbox): Don't assume point-min == 1.
+
+2002-04-08  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * nnml.el (nnml-save-nov, nnml-generate-nov-file):
+       * pop3.el (pop3-md5): Don't hardcode point-min == 1.
+
 2002-04-12  Daiki Ueno  <ueno@unixuser.org>
 
        * gnus-srvr.el (gnus-server-set-info): Clear
 
 2002-01-25  Simon Josefsson  <jas@extundo.com>
 
-       * pop3.el (pop3-munge-message-separator): Work if no date.  From
-       Marius Vollmer <mvo@zagadka.ping.de>.
+       * pop3.el (pop3-munge-message-separator): Work if no date.
+       Trivial patch from Marius Vollmer <mvo@zagadka.ping.de>.
 
 2002-01-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2001-12-03 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * pop3.el (pop3-munge-message-separator): Only use valid date.
-       From Michael Welsh Duggan <md5i@cs.cmu.edu>.
+       Trivial patch from Michael Welsh Duggan <md5i@cs.cmu.edu>.
 
        * Makefile.in: gnus-load.elc may not be generated.
 
index 7d208be..fcf3a26 100644 (file)
     ;; original MULE, XEmacs/mule and Emacs 20+ including
     ;; MULE features.  Unfortunately these API are different.  In
     ;; particular, Emacs (including original MULE) and XEmacs are
-    ;; quite different.  Howvere, this version of Gnus doesn't support
+    ;; quite different.  However, this version of Gnus doesn't support
     ;; anything other than XEmacs 20+ and Emacs 20.3+.
 
     ;; Predicates to check are following:
index ab17d00..82279f4 100644 (file)
@@ -3033,17 +3033,19 @@ buffer that was in action when the last article was fetched."
           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))))
 
@@ -8267,7 +8269,7 @@ If ARG is a negative number, hide the unwanted header lines."
     (save-restriction
       (let* ((buffer-read-only nil)
             (inhibit-point-motion-hooks t)
-            hidden e)
+            hidden e)
        (save-restriction
          (article-narrow-to-head)
          (setq e (point-max)
@@ -8276,12 +8278,11 @@ If ARG is a negative number, hide the unwanted header lines."
                         (gnus-article-hidden-text-p 'headers))))
        (delete-region (point-min) e)
        (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 (search-forward "\n\n" nil t)
                e (if e (1- e) (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)
index ad0e236..646da71 100644 (file)
@@ -975,7 +975,8 @@ When called interactively, prompt for REGEXP."
        (if (looking-at gnus-uu-binhex-begin-line)
            (progn
              (setq state (list 'begin))
-             (write-region 1 1 gnus-uu-binhex-article-name))
+             (write-region (point-min) (point-min)
+                           gnus-uu-binhex-article-name))
          (setq state (list 'middle)))
        (goto-char (point-max))
        (re-search-backward (concat gnus-uu-binhex-body-line "\\|"
@@ -1087,7 +1088,7 @@ When called interactively, prompt for REGEXP."
     (while (re-search-forward "[ \t]+" nil t)
       (replace-match "[ \t]+" t t))
 
-    (buffer-substring 1 (point-max))))
+    (buffer-substring (point-min) (point-max))))
 
 (defun gnus-uu-get-list-of-articles (n)
   ;; If N is non-nil, the article numbers of the N next articles
@@ -1922,7 +1923,7 @@ The user will be asked for a file name."
     (goto-char (point-min))
     (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
     (forward-line -1)
-    (narrow-to-region 1 (point))
+    (narrow-to-region (point-min) (point))
     (unless (mail-fetch-field "mime-version")
       (widen)
       (insert "MIME-Version: 1.0\n"))
@@ -2012,7 +2013,7 @@ If no file has been included, the user will be asked for a file."
       (erase-buffer)
       (insert-buffer-substring post-buf beg-binary end-binary)
       (goto-char (point-min))
-      (setq length (count-lines 1 (point-max)))
+      (setq length (count-lines (point-min) (point-max)))
       (setq parts (/ length gnus-uu-post-length))
       (unless (< (% length gnus-uu-post-length) 4)
        (incf parts)))
@@ -2025,7 +2026,7 @@ If no file has been included, the user will be asked for a file."
     (re-search-forward
      (concat "^" (regexp-quote mail-header-separator) "$") nil t)
     (beginning-of-line)
-    (setq header (buffer-substring 1 (point)))
+    (setq header (buffer-substring (point-min) (point)))
 
     (goto-char (point-min))
     (when gnus-uu-post-separate-description
index 80b25ae..6375279 100644 (file)
@@ -1,5 +1,5 @@
 ;;; nnfolder.el --- mail folder access for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <simon@josefsson.org> (adding MARKS)
@@ -711,7 +711,8 @@ deleted.  Point is left where the deleted region was."
                (let ((nnmail-file-coding-system
                       (or nnfolder-file-coding-system-for-write
                           nnfolder-file-coding-system-for-write)))
-                 (nnmail-write-region 1 1 file t 'nomesg)))
+                 (nnmail-write-region (point-min) (point-min)
+                                      file t 'nomesg)))
              (when (setq nnfolder-current-buffer (nnfolder-read-folder group))
                (set-buffer nnfolder-current-buffer)
                (push (list group nnfolder-current-buffer)
index 0926414..536b1d7 100644 (file)
@@ -667,8 +667,8 @@ If EXAMINE is non-nil the group is selected read-only."
               (cons low high) group server))
            (when (buffer-modified-p)
              (nnmail-write-region
-              1 (point-max) (nnimap-group-overview-filename group server)
-              nil 'nomesg))
+              (point-min) (point-max)
+              (nnimap-group-overview-filename group server) nil 'nomesg))
            (nnheader-nov-delete-outside-range low high))))
       'nov)))
 
index 857adc5..e1e6989 100644 (file)
@@ -1,6 +1,6 @@
 ;;; nnmbox.el --- mail mbox access for Gnus
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
 ;;     Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
               nnmbox-file-coding-system))
          (dir (file-name-directory nnmbox-mbox-file)))
       (and dir (gnus-make-directory dir))
-      (nnmail-write-region 1 1 nnmbox-mbox-file t 'nomesg))))
+      (nnmail-write-region (point-min) (point-min)
+                          nnmbox-mbox-file t 'nomesg))))
 
 (defun nnmbox-read-mbox ()
   (nnmail-activate 'nnmbox)
index b19bbf5..76ca820 100644 (file)
@@ -740,8 +740,8 @@ marks file will be regenerated properly by Gnus.")
       (when (buffer-name (cdar nnml-nov-buffer-alist))
        (set-buffer (cdar nnml-nov-buffer-alist))
        (when (buffer-modified-p)
-         (nnmail-write-region 1 (point-max) nnml-nov-buffer-file-name
-                              nil 'nomesg))
+         (nnmail-write-region (point-min) (point-max)
+                              nnml-nov-buffer-file-name nil 'nomesg))
        (set-buffer-modified-p nil)
        (kill-buffer (current-buffer)))
       (setq nnml-nov-buffer-alist (cdr nnml-nov-buffer-alist)))))
@@ -830,7 +830,7 @@ marks file will be regenerated properly by Gnus.")
           (progn
             (re-search-forward "\n\r?\n" nil t)
             (setq chars (- (point-max) (point)))
-            (max 1 (1- (point)))))
+            (max (point-min) (1- (point)))))
          (unless (zerop (buffer-size))
            (goto-char (point-min))
            (setq headers (nnml-parse-head chars (caar files)))
@@ -842,7 +842,7 @@ marks file will be regenerated properly by Gnus.")
        (setq files (cdr files)))
       (save-excursion
        (set-buffer nov-buffer)
-       (nnmail-write-region 1 (point-max) nov nil 'nomesg)
+       (nnmail-write-region (point-min) (point-max) nov nil 'nomesg)
        (kill-buffer (current-buffer))))))
 
 (defun nnml-nov-delete-article (group article)
index 5f0ef71..685fefb 100644 (file)
@@ -337,7 +337,7 @@ If NOW, use that time instead."
                             t (current-buffer) nil)
        ;; The meaningful output is the first 32 characters.
        ;; Don't return the newline that follows them!
-       (buffer-substring 1 33)))))
+       (buffer-substring (point-min) (+ 32 (point-min)))))))
 
 (defun pop3-stat (process)
   "Return the number of messages in the maildrop and the maildrop's size."