From 2b8a6196291f2b250cb925946722767d93ab74e0 Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 31 Jan 1999 11:27:06 +0000 Subject: [PATCH] Abolish macro `gnus-nov-read-integer', `gnus-nov-skip-field' and `gnus-nov-field'. (gnus-nov-parse-line): Use `nnheader-nov-field' and `nnheader-nov-read-integer' instead of `gnus-nov-field' and `gnus-nov-read-integer'. (gnus-get-newsgroup-headers-xover): Use `gnus-retrieve-parsed-headers'. --- lisp/gnus-sum.el | 70 +++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 6a089f6..e405bd4 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -3025,20 +3025,20 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." ;; The following macros and functions were written by Felix Lee ;; . -(defmacro gnus-nov-read-integer () - '(prog1 - (if (= (following-char) ?\t) - 0 - (let ((num (ignore-errors (read buffer)))) - (if (numberp num) num 0))) - (unless (eobp) - (search-forward "\t" eol 'move)))) +;; (defmacro gnus-nov-read-integer () +;; '(prog1 +;; (if (= (following-char) ?\t) +;; 0 +;; (let ((num (ignore-errors (read buffer)))) +;; (if (numberp num) num 0))) +;; (unless (eobp) +;; (search-forward "\t" eol 'move)))) -(defmacro gnus-nov-skip-field () - '(search-forward "\t" eol 'move)) +;; (defmacro gnus-nov-skip-field () +;; '(search-forward "\t" eol 'move)) -(defmacro gnus-nov-field () - '(buffer-substring (point) (if (gnus-nov-skip-field) (1- (point)) eol))) +;; (defmacro gnus-nov-field () +;; '(buffer-substring (point) (if (gnus-nov-skip-field) (1- (point)) eol))) ;; This function has to be called with point after the article number ;; on the beginning of the line. @@ -3048,27 +3048,27 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." header) ;; overview: [num subject from date id refs chars lines misc] - (unwind-protect - (progn - (narrow-to-region (point) eol) - (unless (eobp) - (forward-char)) - - (setq header - (make-full-mail-header - number ; number - (gnus-nov-field) ; subject - (gnus-nov-field) ; from - (gnus-nov-field) ; date - (or (gnus-nov-field) - (nnheader-generate-fake-message-id)) ; id - (gnus-nov-field) ; refs - (gnus-nov-read-integer) ; chars - (gnus-nov-read-integer) ; lines - (unless (= (following-char) ?\n) - (gnus-nov-field))))) ; misc - - (widen)) + ;;(unwind-protect + ;;(progn + ;;(narrow-to-region (point) eol) + (unless (eobp) + (forward-char)) + + (setq header + (make-full-mail-header + number ; number + (nnheader-nov-field) ; subject + (nnheader-nov-field) ; from + (nnheader-nov-field) ; date + (or (nnheader-nov-field) ; id + (nnheader-generate-fake-message-id)) + (nnheader-nov-field) ; refs + (nnheader-nov-read-integer) ; chars + (nnheader-nov-read-integer) ; lines + (unless (= (following-char) ?\n) + (nnheader-nov-field)))) ; misc + ;;) + ;;(widen)) (when gnus-alter-header-function (funcall gnus-alter-header-function header)) @@ -4548,8 +4548,8 @@ list of headers that match SEQUENCE (see `nntp-retrieve-headers')." (let ((gnus-nov-is-evil t)) (nconc (nreverse headers) - (when (gnus-retrieve-headers sequence group) - (gnus-get-newsgroup-headers)))))))) + (gnus-retrieve-parsed-headers sequence group) + )))))) (defun gnus-article-get-xrefs () "Fill in the Xref value in `gnus-current-headers', if necessary. -- 1.7.10.4