From 08a04d10607c813f9ae8da149d1eb0a3ec9aa692 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Sun, 6 Sep 1998 23:40:53 +0000 Subject: [PATCH] Sync up with Pterodactyl Gnus 0.17. A snapshot is available from ftp://ftp.jpl.org/pub/tmp/semi-gnus-pgnus-ichikawa-19980907-1.tar.gz --- ChangeLog | 6 +++ lisp/ChangeLog | 85 ++++++++++++++++++++++++++++++++++ lisp/drums.el | 4 +- lisp/gnus-agent.el | 131 ++++++++++++++++++++++++++++++++++++---------------- lisp/gnus-art.el | 2 +- lisp/gnus-demon.el | 8 +--- lisp/gnus-group.el | 6 ++- lisp/gnus-msg.el | 3 +- lisp/gnus-score.el | 14 +++--- lisp/gnus-srvr.el | 8 ++-- lisp/gnus-sum.el | 15 ++++-- lisp/gnus-util.el | 33 ++----------- lisp/gnus-xmas.el | 28 ----------- lisp/gnus.el | 11 ++--- lisp/message.el | 21 ++++----- lisp/mm-bodies.el | 11 ++--- lisp/mm-util.el | 5 +- lisp/nndb.el | 1 - lisp/nnmail.el | 1 - lisp/nnspool.el | 15 +----- lisp/nntp.el | 4 -- lisp/rfc2047.el | 2 +- lisp/score-mode.el | 13 ++---- texi/ChangeLog | 1 + texi/gnus.texi | 31 ++++++++----- texi/message.texi | 6 +-- 26 files changed, 270 insertions(+), 195 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ed3a83..02df3eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-09-07 Katsumi Yamaoka + + * lisp/gnus.el (gnus-version-number): Update to 6.10.011. + + * Sync up with Pterodactyl Gnus 0.17. + 1998-09-06 Tatsuya Ichikawa * lisp/gnus.el (gnus-version-number): Update to 6.10.010. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 79e9169..93fb80e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,88 @@ +Sun Sep 6 21:19:26 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.17 is released. + +1998-09-06 05:45:17 Lars Magne Ingebrigtsen + + * time-date.el: Renamed from "date". + + * gnus.el: Removed all timezone dependencies. + + * score-mode.el: Removed. + (gnus-score-edit-insert-date): Use date. + + * date.el (float-to-time): New function. + + * nnspool.el (nnspool-seconds-since-epoch): Removed. + + * date.el (time-to-float): New function. + + * message.el (message-make-date): Use format-time-string. + (message-make-expires): Use make-date. + + * gnus-xmas.el (gnus-xmas-seconds-since-epoch): Removed. + + * gnus-util.el (gnus-dd-mmm): Use date. + (gnus-sortable-date): Ditto. + + * message.el (message-make-date): Take an optional time. + + * gnus: Applied patches from 5.6.43. + + * date.el (if): Use parse-time. + + * gnus-score.el (gnus-summary-score-entry): Make into a command + again. + + * gnus-group.el (gnus-group-get-new-news-this-group): Only call if + gnus-agent. + + * gnus.el (gnus-agent-meta-information-header): Moved here. + +1998-09-05 Mike McEwan + + * gnus-agent.el (gnus-agent-scoreable-headers): New variable. + (gnus-agent-fetch-group-1): Score article headers using normal + group score files if the download score rule of a category/group + is `file'. + (gnus-agent-fetch-group-1): Don't parse the entire .overview when + deciding what articles to download. + (gnus-agent-fetch-group-1): Don't push headers through scoring and + predicate processing if predicate is `true' or `false'. + +1998-09-06 01:56:02 Lars Magne Ingebrigtsen + + * gnus-score.el (gnus-score-load-score-alist): Bind coding system. + + * gnus-art.el (gnus-article-setup-buffer): Enable multibyte. + + * score-mode.el (score-mode-coding-system): New variable. + (gnus-score-edit-exit): Use it. + +1998-09-04 Jason R Mastaler + + * drums.el: Corrected typo. + +1998-09-05 23:24:43 Hallvard B. Furuseth + + * mm-bodies.el (mm-body-encoding): Faster version. + +1998-09-05 22:23:03 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-decode-charset): Only decode text + things. + + * message.el (message-output): Use rmail. + + * rfc2047.el (rfc2047-encoded-word-regexp): Allow spaces in the + word part. + + * mm-util.el (mm-charset-to-coding-system): Use + rfc2047-default-charset. + (mm-known-charsets): New variable. + + * message.el (message-caesar-region): Bugged out. + Sat Sep 5 21:55:01 1998 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.16 is released. diff --git a/lisp/drums.el b/lisp/drums.el index db982b7..1f45a89 100644 --- a/lisp/drums.el +++ b/lisp/drums.el @@ -21,14 +21,14 @@ ;;; Commentary: -;; DRUMS is and IETF Working Group that works (or worked) on the +;; DRUMS is an IETF Working Group that works (or worked) on the ;; successor to RFC822, "Standard For The Format Of Arpa Internet Text ;; Messages". This library is based on ;; draft-ietf-drums-msg-fmt-05.txt, released on 1998-08-05. ;;; Code: -(require 'date) +(require 'time-date) (defvar drums-no-ws-ctl-token "\001-\010\013\014\016-\037\177" "US-ASCII control characters excluding CR, LF and white space.") diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index c1a5ea6..a9fe734 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -27,7 +27,8 @@ (require 'gnus-cache) (require 'nnvirtual) (require 'gnus-sum) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl) + (require 'gnus-score)) (defcustom gnus-agent-directory (nnheader-concat gnus-directory "agent/") "Where the Gnus agent will store its files." @@ -77,8 +78,6 @@ If nil, only read articles will be expired." ;;; Internal variables -(defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information") - (defvar gnus-agent-history-buffers nil) (defvar gnus-agent-buffer-alist nil) (defvar gnus-agent-article-alist nil) @@ -94,6 +93,13 @@ If nil, only read articles will be expired." (defvar gnus-agent-send-mail-function nil) (defvar gnus-agent-article-file-coding-system 'no-conversion) +(defconst gnus-agent-scoreable-headers + (list + "subject" "from" "date" "message-id" + "references" "chars" "lines" "xref") + "Headers that are considered when scoring articles +for download via the Agent.") + ;; Dynamic variables (defvar gnus-headers) (defvar gnus-score) @@ -750,17 +756,13 @@ the actual number of articles toggled is returned." (pop gnus-agent-group-alist)))) (defun gnus-agent-fetch-headers (group articles &optional force) - (gnus-agent-load-alist group) - ;; Find out what headers we need to retrieve. - (when articles - (while (and articles - (assq (car articles) gnus-agent-article-alist)) - (pop articles)) - (let ((arts articles)) - (while (cdr arts) - (if (assq (cadr arts) gnus-agent-article-alist) - (setcdr arts (cddr arts)) - (setq arts (cdr arts))))) + (let ((articles (if (gnus-agent-load-alist group) + (gnus-sorted-intersection + (gnus-list-of-unread-articles group) + (gnus-uncompress-range + (cons (1+ (caar (last gnus-agent-article-alist))) + (cdr (gnus-active group))))) + (gnus-list-of-unread-articles group)))) ;; Fetch them. (when articles (gnus-message 7 "Fetching headers for %s..." group) @@ -789,10 +791,11 @@ the actual number of articles toggled is returned." (file-name-directory file))) (write-region (point-min) (point-max) file nil 'silent) (gnus-agent-save-alist group articles nil) - (gnus-agent-enter-history "last-header-fetched-for-session" - (list (cons group (nth (- (length articles) 1) articles))) - (time-to-day (current-time))) - t))))) + (gnus-agent-enter-history + "last-header-fetched-for-session" + (list (cons group (nth (- (length articles) 1) articles))) + (time-to-day (current-time))) + articles))))) (defsubst gnus-agent-copy-nov-line (article) (let (b e) @@ -910,27 +913,63 @@ the actual number of articles toggled is returned." ;; Parse them and see which articles we want to fetch. (setq gnus-newsgroup-dependencies (make-vector (length articles) 0)) - (setq gnus-newsgroup-headers - (gnus-get-newsgroup-headers-xover articles nil nil group)) + ;; No need to call `gnus-get-newsgroup-headers-xover' with + ;; the entire .overview for group as we still have the just + ;; downloaded headers in `gnus-agent-overview-buffer'. + (let ((nntp-server-buffer gnus-agent-overview-buffer)) + (setq gnus-newsgroup-headers + (gnus-get-newsgroup-headers-xover articles nil nil group))) (setq category (gnus-group-category group)) (setq predicate (gnus-get-predicate (or (gnus-group-get-parameter group 'agent-predicate) (cadr category)))) - (setq score-param - (or (gnus-group-get-parameter group 'agent-score) - (caddr category))) - (when score-param - (gnus-score-headers (list (list score-param)))) - (setq arts nil) - (while (setq gnus-headers (pop gnus-newsgroup-headers)) - (setq gnus-score - (or (cdr (assq (mail-header-number gnus-headers) - gnus-newsgroup-scored)) - gnus-summary-default-score)) - (when (funcall predicate) - (push (mail-header-number gnus-headers) - arts))) + ;; Do we want to download everything, or nothing? + (if (or (eq (caaddr predicate) 'gnus-agent-true) + (eq (caaddr predicate) 'gnus-agent-false)) + ;; Yes. + (setq arts (symbol-value + (cadr (assoc (caaddr predicate) + '((gnus-agent-true articles) + (gnus-agent-false nil)))))) + ;; No, we need to decide what we want. + (setq score-param + (let ((score-method (or + (gnus-group-get-parameter group 'agent-score t) + (caddr category)))) + (when score-method + (require 'gnus-score) + (if (eq score-method 'file) + (let ((entries + (gnus-score-load-files + (gnus-all-score-files group))) + list score-file) + (while (setq list (car entries)) + (push (car list) score-file) + (setq list (cdr list)) + (while list + (when (member (caar list) + gnus-agent-scoreable-headers) + (push (car list) score-file)) + (setq list (cdr list))) + (setq score-param + (append score-param (list (nreverse score-file))) + score-file nil entries (cdr entries))) + (list score-param)) + (if (stringp (car score-method)) + score-method + (list (list score-method))))))) + (when score-param + (gnus-score-headers score-param)) + (setq arts nil) + (while (setq gnus-headers (pop gnus-newsgroup-headers)) + (setq gnus-score + (or (cdr (assq (mail-header-number gnus-headers) + gnus-newsgroup-scored)) + gnus-summary-default-score)) + (when (funcall predicate) + (push (mail-header-number gnus-headers) + arts)))) ;; Fetch the articles. (when arts (gnus-agent-fetch-articles group arts))) @@ -1362,7 +1401,8 @@ The following commands are available: (sort gnus-agent-article-alist 'car-less-than-car)) (let* ((alist gnus-agent-article-alist) (prev (cons nil alist)) - (first prev)) + (first prev) + expired) (while (and alist (<= (caar alist) article)) (if (or (not (cdar alist)) @@ -1371,22 +1411,33 @@ The following commands are available: (number-to-string (caar alist)) group)))) - (setcdr prev (setq alist (cdr alist))) + (progn + (push (caar alist) expired) + (setcdr prev (setq alist (cdr alist)))) (setq prev alist alist (cdr alist)))) (setq gnus-agent-article-alist (cdr first)) - ;;; Mark all articles up to the first article - ;;; in `gnus-article-alist' as read. + (gnus-agent-save-alist group) + ;; Mark all articles up to the first article + ;; in `gnus-article-alist' as read. (when (caar gnus-agent-article-alist) (setcar (nthcdr 2 info) (gnus-range-add (nth 2 info) (cons 1 (- (caar gnus-agent-article-alist) 1))))) + ;; Maybe everything has been expired from `gnus-article-alist' + ;; and so the above marking as read could not be conducted, + ;; or there are expired article within the range of the alist. + (when (or (not (caar gnus-agent-article-alist)) + (> (car expired) (caar gnus-agent-article-alist))) + (setcar (nthcdr 2 info) + (gnus-add-to-range + (nth 2 info) + (nreverse expired)))) (gnus-dribble-enter (concat "(gnus-group-set-info '" (gnus-prin1-to-string info) - ")")) - (gnus-agent-save-alist group))) + ")")))) expiry-hashtb) (set-buffer history) (setq histories (nreverse (sort histories '<))) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 51b1083..b3e2396 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1903,7 +1903,7 @@ commands: ;; Init original article buffer. (save-excursion (set-buffer (gnus-get-buffer-create gnus-original-article-buffer)) - (buffer-disable-undo (current-buffer)) + (mm-enable-multibyte) (setq major-mode 'gnus-original-article-mode) (make-local-variable 'gnus-original-article)) (if (get-buffer name) diff --git a/lisp/gnus-demon.el b/lisp/gnus-demon.el index 4311941..d239dda 100644 --- a/lisp/gnus-demon.el +++ b/lisp/gnus-demon.el @@ -82,10 +82,6 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's." (defvar gnus-inhibit-demon nil "*If non-nil, no daemonic function will be run.") -(eval-and-compile - (autoload 'timezone-parse-date "timezone") - (autoload 'timezone-make-arpa-date "timezone")) - ;;; Functions. (defun gnus-demon-add-handler (function time idle) @@ -155,9 +151,9 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's." time (let* ((now (current-time)) ;; obtain NOW as discrete components -- make a vector for speed - (nowParts (apply 'vector (decode-time now))) + (nowParts (decode-time now)) ;; obtain THEN as discrete components - (thenParts (timezone-parse-time time)) + (thenParts (parse-time-string time)) (thenHour (string-to-int (elt thenParts 0))) (thenMin (string-to-int (elt thenParts 1))) ;; convert time as elements into number of seconds since EPOCH. diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 736ad53..51ca68c 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -35,6 +35,7 @@ (require 'gnus-range) (require 'gnus-win) (require 'gnus-undo) +(require 'time-date) (defcustom gnus-group-archive-directory "*ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/" @@ -2946,8 +2947,9 @@ If N is negative, this group and the N-1 previous groups will be checked." (gnus-get-info group) (gnus-active group) t) (unless (gnus-virtual-group-p group) (gnus-close-group group)) - (gnus-agent-save-group-info - method (gnus-group-real-name group) (gnus-active group)) + (when gnus-agent + (gnus-agent-save-group-info + method (gnus-group-real-name group) (gnus-active group))) (gnus-group-update-group group)) (if (eq (gnus-server-status (gnus-find-method-for-group group)) 'denied) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index d9de8ed..8df3249 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -570,8 +570,7 @@ automatically." ;; Stripping headers should be specified with mail-yank-ignored-headers. (when yank (gnus-summary-goto-subject (car yank))) - (let ((gnus-article-reply t) - (gnus-inhibit-posting-styles t)) + (let ((gnus-article-reply t)) (gnus-setup-message (if yank 'reply-yank 'reply) (gnus-summary-select-article) (set-buffer (gnus-copy-article-buffer)) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 2d1c93f..d3813f5 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -505,7 +505,7 @@ used as score." (?l "lines" nil nil number) (?d "date" nil nil date) (?f "followup" nil nil string) - (?t "thread" nil nil string))) + (?t "thread" "message-id" nil string))) (char-to-type '((?s s "substring" string) (?e e "exact string" string) @@ -591,7 +591,7 @@ used as score." ;; It was a majuscule, so we end reading and use the default. (if mimic (message "%c %c %c" prefix hchar tchar) (message "")) - (setq pchar (or pchar ?p))) + (setq pchar (or pchar ?t))) ;; We continue reading. (while (not pchar) @@ -743,6 +743,7 @@ used as score." (defun gnus-summary-score-entry (header match type score date &optional prompt silent) + (interactive) "Enter score file entry. HEADER is the header being scored. MATCH is the string we are looking for. @@ -1202,9 +1203,9 @@ SCORE is the score to add." ;; Couldn't read file. (setq gnus-score-alist nil) ;; Read file. - (save-excursion - (gnus-set-work-buffer) - (insert-file-contents file) + (with-temp-buffer + (let ((coding-system-for-write score-mode-coding-system)) + (insert-file-contents file)) (goto-char (point-min)) ;; Only do the loading if the score file isn't empty. (when (save-excursion (re-search-forward "[()0-9a-zA-Z]" nil t)) @@ -1337,7 +1338,8 @@ SCORE is the score to add." (delete-file file) ;; There are scores, so we write the file. (when (file-writable-p file) - (gnus-write-buffer file) + (let ((coding-system-for-write score-mode-coding-system)) + (gnus-write-buffer file)) (when gnus-score-after-write-file-function (funcall gnus-score-after-write-file-function file))))) (and gnus-score-uncacheable-files diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index ffe5533..21abf17 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -592,9 +592,11 @@ The following commands are available: (while (re-search-forward "\\(^[^ \t]+\\)[ \t]+[0-9]+[ \t]+[0-9]+" nil t) (goto-char (match-end 1)) - (push (cons (match-string 1) - (max 0 (- (1+ (read cur)) (read cur)))) - groups)))) + (condition-case () + (push (cons (match-string 1) + (max 0 (- (1+ (read cur)) (read cur)))) + groups) + (error nil))))) (setq groups (sort groups (lambda (l1 l2) (string< (car l1) (car l2))))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index ef724ac..8a034cf 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2047,6 +2047,7 @@ The following commands are available: (let ((data gnus-newsgroup-data)) (save-excursion (gnus-save-hidden-threads + (gnus-summary-show-all-threads) (goto-char (point-min)) (while data (while (get-text-property (point) 'gnus-intangible) @@ -3411,6 +3412,7 @@ If LINE, insert the rebuilt thread starting on line LINE." (while thread (gnus-remove-thread-1 (car thread)) (setq thread (cdr thread)))) + (gnus-summary-show-all-threads) (gnus-remove-thread-1 thread)))))))) (defun gnus-remove-thread-1 (thread) @@ -5149,12 +5151,12 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil." (gnus-kill-buffer buf))) (setq gnus-current-select-method gnus-select-method) (pop-to-buffer gnus-group-buffer) - ;; Clear the current group name. (if (not quit-config) (progn (goto-char group-point) (gnus-configure-windows 'group 'force)) (gnus-handle-ephemeral-exit quit-config)) + ;; Clear the current group name. (unless quit-config (setq gnus-newsgroup-name nil))))) @@ -7210,10 +7212,7 @@ latter case, they will be copied into the relevant groups." lines (count-lines (point-min) (point-max))) (insert "From: " (read-string "From: ") "\n" "Subject: " (read-string "Subject: ") "\n" - "Date: " (timezone-make-date-arpa-standard - (current-time-string (nth 5 atts)) - (current-time-zone now) - (current-time-zone now)) + "Date: " (message-make-date (nth 5 atts)) "\n" "Message-ID: " (message-make-message-id) "\n" "Lines: " (int-to-string lines) "\n" @@ -7695,6 +7694,8 @@ returned." (= mark gnus-read-mark) (= mark gnus-souped-mark) (= mark gnus-duplicate-mark))) (setq mark gnus-expirable-mark) + ;; Let the backend know about the mark change. + (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) (push article gnus-newsgroup-expirable)) ;; Set the mark in the buffer. (gnus-summary-update-mark mark 'unread) @@ -7704,6 +7705,8 @@ returned." "Mark the current article quickly as unread with MARK." (let* ((article (gnus-summary-article-number)) (old-mark (gnus-summary-article-mark article))) + ;; Allow the backend to change the mark. + (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) (if (eq mark old-mark) t (if (<= article 0) @@ -7759,6 +7762,8 @@ marked." (let* ((mark (or mark gnus-del-mark)) (article (or article (gnus-summary-article-number))) (old-mark (gnus-summary-article-mark article))) + ;; Allow the backend to change the mark. + (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) (if (eq mark old-mark) t (unless article diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 3cc38b5..d96d57b 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -34,7 +34,7 @@ (eval-when-compile (require 'cl)) (require 'nnheader) (require 'message) -(require 'date) +(require 'time-date) (eval-and-compile (autoload 'rmail-insert-rmail-file-header "rmail") @@ -297,20 +297,7 @@ (defun gnus-dd-mmm (messy-date) "Return a string like DD-MMM from a big messy string." - (let ((datevec (ignore-errors (timezone-parse-date messy-date)))) - (if (or (not datevec) - (string-equal "0" (aref datevec 1))) - "??-???" - (format "%2s-%s" - (condition-case () - ;; Make sure leading zeroes are stripped. - (number-to-string (string-to-number (aref datevec 2))) - (error "??")) - (capitalize - (or (car - (nth (1- (string-to-number (aref datevec 1))) - timezone-months-assoc)) - "???")))))) + (format-time-string "%2d-%b" (date-to-time messy-date))) (defmacro gnus-date-get-time (date) "Convert DATE string to Emacs time. @@ -452,20 +439,8 @@ If N, return the Nth ancestor instead." (cons (and (numberp event) event) event))) (defun gnus-sortable-date (date) - "Make sortable string by string-lessp from DATE. -Timezone package is used." - (condition-case () - (progn - (setq date (inline (timezone-fix-time - date nil - (aref (inline (timezone-parse-date date)) 4)))) - (inline - (timezone-make-sortable-date - (aref date 0) (aref date 1) (aref date 2) - (inline - (timezone-make-time-string - (aref date 3) (aref date 4) (aref date 5)))))) - (error ""))) + "Make string suitable for sorting from DATE." + (gnus-time-iso8601 (date-to-time date))) (defun gnus-copy-file (file &optional to) "Copy FILE to TO." diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index 4f637e0..8e28a46 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -398,24 +398,6 @@ call it with the value of the `gnus-data' text property." (event-to-character event)) event))) -(defun gnus-xmas-seconds-since-epoch (date) - "Return a floating point number that says how many seconds have lapsed between Jan 1 12:00:00 1970 and DATE." - (let* ((tdate (mapcar (lambda (ti) (and ti (string-to-int ti))) - (timezone-parse-date date))) - (ttime (mapcar (lambda (ti) (and ti (string-to-int ti))) - (timezone-parse-time - (aref (timezone-parse-date date) 3)))) - (edate (mapcar (lambda (ti) (and ti (string-to-int ti))) - (timezone-parse-date "Jan 1 12:00:00 1970"))) - (tday (- (timezone-absolute-from-gregorian - (nth 1 tdate) (nth 2 tdate) (nth 0 tdate)) - (timezone-absolute-from-gregorian - (nth 1 edate) (nth 2 edate) (nth 0 edate))))) - (+ (nth 2 ttime) - (* (nth 1 ttime) 60) - (* (float (nth 0 ttime)) 60 60) - (* (float tday) 60 60 24)))) - (defun gnus-xmas-define () (setq gnus-mouse-2 [button2]) @@ -460,16 +442,6 @@ call it with the value of the `gnus-data' text property." (defvar gnus-mouse-face-prop 'highlight) - (unless (fboundp 'encode-time) - (defun encode-time (sec minute hour day month year &optional zone) - (let ((seconds - (gnus-xmas-seconds-since-epoch - (timezone-make-arpa-date - year month day (timezone-make-time-string hour minute sec) - zone)))) - (list (floor (/ seconds (expt 2 16))) - (round (mod seconds (expt 2 16))))))) - (defun gnus-byte-code (func) "Return a form that can be `eval'ed based on FUNC." (let ((fval (indirect-function func))) diff --git a/lisp/gnus.el b/lisp/gnus.el index b24ca91..5834128 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -253,10 +253,10 @@ is restarted, and sometimes reloaded." (defconst gnus-product-name "T-gnus" "Product name of this version of gnus.") -(defconst gnus-version-number "6.10.010" +(defconst gnus-version-number "6.10.011" "Version number for this version of gnus.") -(defconst gnus-original-version-number "0.16" +(defconst gnus-original-version-number "0.17" "Version number for this version of Gnus.") (defconst gnus-original-product-name "Pterodactyl Gnus" @@ -1419,6 +1419,7 @@ want." ;;; Internal variables +(defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information") (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter) (defvar gnus-original-article-buffer " *Original Article*") (defvar gnus-newsgroup-name nil) @@ -1593,8 +1594,6 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") message-send-and-exit message-yank-original) ("nnmail" nnmail-split-fancy nnmail-article-group) ("nnvirtual" nnvirtual-catchup-group nnvirtual-convert-headers) - ("timezone" timezone-make-date-arpa-standard timezone-fix-time - timezone-make-sortable-date timezone-make-time-string) ("rmailout" rmail-output) ("rmail" rmail-insert-rmail-file-header rmail-count-new-messages rmail-show-message rmail-output-to-rmail-file) @@ -1677,8 +1676,8 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-post-news gnus-summary-reply gnus-summary-reply-with-original gnus-summary-mail-forward gnus-summary-mail-other-window gnus-summary-resend-message gnus-summary-resend-bounced-mail - gnus-summary-wide-reply - gnus-bug) + gnus-summary-wide-reply gnus-summary-followup-to-mail + gnus-summary-followup-to-mail-with-original gnus-bug) ("gnus-picon" :interactive t gnus-article-display-picons gnus-group-display-picons gnus-picons-article-display-x-face gnus-picons-display-x-face) diff --git a/lisp/message.el b/lisp/message.el index f2ba282..855adf2 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -39,7 +39,6 @@ (require 'mailheader) (require 'nnheader) -(require 'timezone) (require 'easymenu) (require 'custom) (if (string-match "XEmacs\\|Lucid" emacs-version) @@ -1063,7 +1062,6 @@ The cdr of ech entry is a function for applying the face to a region.") (autoload 'gnus-point-at-eol "gnus-util") (autoload 'gnus-point-at-bol "gnus-util") (autoload 'gnus-output-to-mail "gnus-util") - (autoload 'gnus-output-to-rmail "gnus-util") (autoload 'mail-abbrev-in-expansion-header-p "mailabbrev") (autoload 'nndraft-request-associate-buffer "nndraft") (autoload 'nndraft-request-expire-articles "nndraft") @@ -1754,8 +1752,8 @@ text was killed." ;; Then we translate the region. Do it this way to retain ;; text properties. (while (< b e) - (subst-char-in-region - (when (< (char-after b) 255) + (when (< (char-after b) 255) + (subst-char-in-region b (1+ b) (char-after b) (aref message-caesar-translation-table (char-after b)))) (incf b)))) @@ -2797,7 +2795,7 @@ to find out how to use this." "Append this article to Unix/babyl mail file.." (if (and (file-readable-p filename) (mail-file-babyl-p filename)) - (gnus-output-to-rmail filename t) + (rmail-output-to-rmail-file filename t) (gnus-output-to-mail filename t))) (defun message-cleanup-headers () @@ -2832,11 +2830,10 @@ to find out how to use this." (when (re-search-forward ",+$" nil t) (replace-match "" t t)))))) -(defun message-make-date () - "Make a valid data header." - (let ((now (current-time))) - (timezone-make-date-arpa-standard - (current-time-string now) (current-time-zone now)))) +(defun message-make-date (&optional now) + "Make a valid data header. +If NOW, use that time instead." + (format-time-string "%d %b %Y %H:%M:%S %z" (or now (current-time)))) (defun message-make-followup-subject (subject) "Make a followup Subject." @@ -2972,9 +2969,7 @@ to find out how to use this." ;; Add the future to current. (setcar current (+ (car current) (round (/ future (expt 2 16))))) (setcar (cdr current) (+ (nth 1 current) (% (round future) (expt 2 16)))) - ;; Return the date in the future in UT. - (timezone-make-date-arpa-standard - (current-time-string current) (current-time-zone current) '(0 "UT")))) + (message-make-date current))) (defun message-make-path () "Return uucp path." diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index 9de7f36..23ee6f6 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -78,14 +78,9 @@ If no encoding was done, nil is returned." ;;;!!!above seems to return the wrong result under Emacs 20.3. ;;;!!!Sometimes. (save-excursion - (let (found) - (goto-char (point-min)) - (while (and (not found) - (not (eobp))) - (when (> (mm-char-int (following-char)) 127) - (setq found t)) - (forward-char 1)) - (not found)))) + (goto-char (point-min)) + (skip-chars-forward "\0-\177") + (eobp))) '7bit '8bit)) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index c3fab98..b36c62b 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -24,6 +24,9 @@ ;;; Code: +(defvar mm-known-charsets '(iso-8859-1) + "List of known charsets.") + (defvar mm-mime-mule-charset-alist '((us-ascii ascii) (iso-8859-1 latin-iso8859-1) @@ -143,7 +146,7 @@ used as the line break code type of the coding system." (cond ;; Running in a non-MULE environment. ((and (null (mm-coding-system-list)) - (eq charset 'iso-8859-1)) + (memq charset mm-known-charsets)) charset) ;; Check to see whether we can handle this charset. ((memq charset (mm-coding-system-list)) diff --git a/lisp/nndb.el b/lisp/nndb.el index 9a3efba..17f5359 100644 --- a/lisp/nndb.el +++ b/lisp/nndb.el @@ -70,7 +70,6 @@ (autoload 'cancel-timer "timer") (autoload 'telnet "telnet" nil t) (autoload 'telnet-send-input "telnet" nil t) - (autoload 'timezone-parse-date "timezone") (autoload 'gnus-declare-backend "gnus-start")) ;; Declare nndb as derived from nntp diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 383b472..2581172 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -28,7 +28,6 @@ (eval-when-compile (require 'cl)) (require 'nnheader) -(require 'timezone) (require 'message) (require 'custom) (require 'gnus-util) diff --git a/lisp/nnspool.el b/lisp/nnspool.el index 6914f78..dd0b28a 100644 --- a/lisp/nnspool.el +++ b/lisp/nnspool.el @@ -28,7 +28,6 @@ (require 'nnheader) (require 'nntp) -(require 'timezone) (require 'nnoo) (eval-when-compile (require 'cl)) @@ -280,7 +279,7 @@ there.") (while (and (not (looking-at "\\([^ ]+\\) +\\([0-9]+\\)[0-9][0-9][0-9] ")) (zerop (forward-line -1)))) - (let ((seconds (nnspool-seconds-since-epoch date)) + (let ((seconds (time-to-float (date-to-time date))) groups) ;; Go through lines and add the latest groups to a list. (while (and (looking-at "\\([^ ]+\\) +[0-9]+ ") @@ -453,18 +452,6 @@ there.") "Find the path for GROUP." (nnheader-group-pathname group nnspool-spool-directory article)) -(defun nnspool-seconds-since-epoch (date) - (let* ((tdate (mapcar (lambda (ti) (and ti (string-to-int ti))) - (timezone-parse-date date))) - (ttime (mapcar (lambda (ti) (and ti (string-to-int ti))) - (timezone-parse-time - (aref (timezone-parse-date date) 3)))) - (unix (encode-time (nth 2 ttime) (nth 1 ttime) (nth 0 ttime) - (nth 2 tdate) (nth 1 tdate) (nth 0 tdate) - (nth 4 tdate)))) - (+ (* (car unix) 65536.0) - (cadr unix)))) - (provide 'nnspool) ;;; nnspool.el ends here diff --git a/lisp/nntp.el b/lisp/nntp.el index 4828187..1fb9960 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -30,10 +30,6 @@ (nnoo-declare nntp) -(eval-and-compile - (unless (fboundp 'open-network-stream) - (require 'tcp))) - (eval-when-compile (require 'cl)) (defvoo nntp-address nil diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index f15fa98..0fe7328 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -221,7 +221,7 @@ Should be called narrowed to the head of the message." ;;; (defvar rfc2047-encoded-word-regexp - "=\\?\\([^][\000-\040()<>@,\;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\\?\\([!->@-~]+\\)\\?=") + "=\\?\\([^][\000-\040()<>@,\;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\\?\\([!->@-~ ]+\\)\\?=") ;;;###autoload (defun rfc2047-decode-region (start end) diff --git a/lisp/score-mode.el b/lisp/score-mode.el index 24c31f6..c1c7158 100644 --- a/lisp/score-mode.el +++ b/lisp/score-mode.el @@ -26,7 +26,6 @@ ;;; Code: (require 'easymenu) -(require 'timezone) (eval-when-compile (require 'cl)) (defvar gnus-score-mode-hook nil @@ -51,6 +50,8 @@ table) "Syntax table used in score-mode buffers.") +(defvar score-mode-coding-system 'binary) + ;;;###autoload (defun gnus-score-mode () "Mode for editing Gnus score files. @@ -81,7 +82,7 @@ This mode is an extended emacs-lisp mode. (defun gnus-score-edit-insert-date () "Insert date in numerical format." (interactive) - (princ (gnus-score-day-number (current-time)) (current-buffer))) + (princ (time-to-day (current-time)) (current-buffer))) (defun gnus-score-pretty-print () "Format the current score file." @@ -98,7 +99,8 @@ This mode is an extended emacs-lisp mode. (interactive) (unless (file-exists-p (file-name-directory (buffer-file-name))) (make-directory (file-name-directory (buffer-file-name)) t)) - (save-buffer) + (let ((coding-system-for-write score-mode-coding-system)) + (save-buffer)) (bury-buffer (current-buffer)) (let ((buf (current-buffer))) (when gnus-score-edit-exit-function @@ -106,11 +108,6 @@ This mode is an extended emacs-lisp mode. (when (eq buf (current-buffer)) (switch-to-buffer (other-buffer (current-buffer)))))) -(defun gnus-score-day-number (time) - (let ((dat (decode-time time))) - (timezone-absolute-from-gregorian - (nth 4 dat) (nth 3 dat) (nth 5 dat)))) - (provide 'score-mode) ;;; score-mode.el ends here diff --git a/texi/ChangeLog b/texi/ChangeLog index 7915d93..cac38a8 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,6 +1,7 @@ 1998-09-05 17:36:14 Lars Magne Ingebrigtsen * gnus.texi (Sorting Groups): Change. + (Various Summary Stuff): Addition. 1998-09-04 00:40:07 David S. Goldberg diff --git a/texi/gnus.texi b/texi/gnus.texi index 44499ca..24cb4bc 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Semi-gnus 6.10.010 Manual +@settitle Semi-gnus 6.10.011 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -318,7 +318,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Semi-gnus 6.10.010 Manual +@title Semi-gnus 6.10.011 Manual @author by Lars Magne Ingebrigtsen @page @@ -361,7 +361,7 @@ internationalization/localization and multiscript features based on MULE API. So Semi-gnus does not discriminate various language communities. Oh, if you are a Klingon, please wait Unicode Next Generation. -This manual corresponds to Semi-gnus 6.10.010. +This manual corresponds to Semi-gnus 6.10.011. @end ifinfo @@ -7374,6 +7374,11 @@ It is called after the summary buffer has been generated. You might use it to, for instance, highlight lines or modify the look of the buffer in some other ungodly manner. I don't care. +@vindex gnus-summary-prepared-hook +@item gnus-summary-prepared-hook +A hook called as the very last thing after the summary buffer has been +generated. + @vindex gnus-summary-ignore-duplicates @item gnus-summary-ignore-duplicates When gnus discovers two articles that have the same @code{Message-ID}, @@ -8478,7 +8483,7 @@ So here's a new example: (signature my-funny-signature-randomizer)) ((equal (system-name) "gnarly") (signature my-quote-randomizer)) - (message-this-is-new + (message-this-is-news (signature my-news-signature)) (posting-from-work-p (signature-file "~/.work-signature") @@ -15712,8 +15717,8 @@ We do have some breaches to this one. @table @emph @item MIME -Gnus does no MIME handling, and this standard-to-be seems to think that -MIME is the bees' knees, so we have major breakage here. +Gnus does not yet fully handle MIME, and this standard-to-be seems to +think that MIME is the bees' knees, so we have major breakage here. @item X-Newsreader This is considered to be a ``vanity header'', while I consider it to be @@ -15723,6 +15728,13 @@ those for posting articles. I would not have known that if it wasn't for the @code{X-Newsreader} header. @end table +@item USEFOR +@cindex USEFOR +USEFOR is an IETF working group writing a successor to RFC 1036, based +on Son-of-RFC 1036. They have produced a number of drafts proposing +various changes to the format of news articles. The Gnus towers will +look into implementing the changes when the draft is accepted as an RFC. + @end table If you ever notice Gnus acting non-compliant with regards to the texts @@ -15742,13 +15754,10 @@ Gnus should work on : @itemize @bullet @item -Emacs 19.32 and up. - -@item -XEmacs 19.14 and up. +Emacs 20.2 and up. @item -Mule versions based on Emacs 19.32 and up. +XEmacs 20.4 and up. @end itemize diff --git a/texi/message.texi b/texi/message.texi index b6d669a..d0539bc 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.16 Manual +@settitle Pterodactyl Message 0.17 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Message 0.16 Manual +@title Pterodactyl Message 0.17 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Pterodactyl Message 0.16. Message is +This manual corresponds to Pterodactyl Message 0.17. Message is distributed with the Gnus distribution bearing the same version number as this manual has. -- 1.7.10.4