From: yamaoka Date: Mon, 14 Jun 2004 22:07:43 +0000 (+0000) Subject: Synch to No Gnus 200406141734. X-Git-Tag: t-gnus-6_17_4-quimby-~862 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89bb542ed27647a40eae316eb1a3736eb55dea48;p=elisp%2Fgnus.git- Synch to No Gnus 200406141734. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a40a0f..57de3a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2004-06-14 Teodor Zlatanov + + * nnheader.el (nnheader-generate-fake-message-id): accept a + number and build a fake message ID localized to a group and + article number (so it's repeatable from that point on) + (nnheader-fake-message-id-p): change regex to accomodate new fake + ID format + + * gnus-sum.el (gnus-get-newsgroup-headers): call + nnheader-generate-fake-message-id with the article number + 2004-06-12 YAGI Tatsuya (tiny change) * gnus-art.el (gnus-article-next-page): Fix the way to find a real diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index d7573f9..bd0dcd0 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -5785,7 +5785,7 @@ The resulting hash table is returned, or nil if no Xrefs were found." (or dependencies (with-current-buffer gnus-summary-buffer gnus-newsgroup-dependencies))) - headers id end ref + headers id end ref number (mail-parse-charset gnus-newsgroup-charset) (mail-parse-ignored-charsets (save-excursion (condition-case nil @@ -5818,7 +5818,7 @@ The resulting hash table is returned, or nil if no Xrefs were found." (make-full-mail-header ;; Number. (prog1 - (read cur) + (setq number (read cur)) (end-of-line) (setq p (point)) (narrow-to-region (point) @@ -5853,7 +5853,7 @@ The resulting hash table is returned, or nil if no Xrefs were found." (match-end 1)) ;; If there was no message-id, we just fake one ;; to make subsequent routines simpler. - (nnheader-generate-fake-message-id)))) + (nnheader-generate-fake-message-id number)))) ;; References. (progn (goto-char p) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index cfee952..1b81916 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -615,12 +615,16 @@ given, the return value will not contain the last newline." (defvar nnheader-fake-message-id 1) -(defsubst nnheader-generate-fake-message-id () - (concat "fake+none+" (int-to-string (incf nnheader-fake-message-id)))) +(defsubst nnheader-generate-fake-message-id (&optional number) + (if (numberp number) + (format "fake+none+%s+%d" gnus-newsgroup-name number) + (format "fake+none+%s+%s" + gnus-newsgroup-name + (int-to-string (incf nnheader-fake-message-id))))) (defsubst nnheader-fake-message-id-p (id) (save-match-data ; regular message-id's are <.*> - (string-match "\\`fake\\+none\\+[0-9]+\\'" id))) + (string-match "\\`fake\\+none\\+.*\\+[0-9]+\\'" id))) ;; Parsing headers and NOV lines. @@ -685,7 +689,7 @@ given, the return value will not contain the last newline." (or (search-forward ">" (point-at-eol) t) (point))) ;; If there was no message-id, we just fake one to make ;; subsequent routines simpler. - (nnheader-generate-fake-message-id))) + (nnheader-generate-fake-message-id number))) ;; References. (progn (goto-char p) @@ -784,20 +788,21 @@ given, the return value will not contain the last newline." out))) out)) -(defmacro nnheader-nov-read-message-id () +(defmacro nnheader-nov-read-message-id (&optional number) '(let ((id (nnheader-nov-field))) (if (string-match "^<[^>]+>$" id) id - (nnheader-generate-fake-message-id)))) + (nnheader-generate-fake-message-id number)))) (defun nnheader-parse-nov () - (let ((eol (point-at-eol))) + (let ((eol (point-at-eol)) + (number (nnheader-nov-read-integer))) (make-full-mail-header - (nnheader-nov-read-integer) ; number + number ; number (nnheader-nov-field) ; subject (nnheader-nov-field) ; from (nnheader-nov-field) ; date - (nnheader-nov-read-message-id) ; id + (nnheader-nov-read-message-id number) ; id (nnheader-nov-field) ; refs (nnheader-nov-read-integer) ; chars (nnheader-nov-read-integer) ; lines