From: shuhei-k Date: Wed, 3 Jun 1998 13:17:31 +0000 (+0000) Subject: Sync up with Gnus 5.6.11. X-Git-Tag: gnus-6_7-tomo-199811302358~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d09ea7141f9a1cf6ef806967d9587f6a048fab6;p=elisp%2Fgnus.git- Sync up with Gnus 5.6.11. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f797b6..7054db5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,63 @@ +Wed Jun 3 04:03:37 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.11 is released. + +Wed Jun 3 03:33:50 1998 Lars Magne Ingebrigtsen + + * gnus.el: Checked doc string syntax throughout. + + * message.el (message-subject-re-regexp): Renamed. + +Wed Jun 3 03:33:05 1998 Simon Josefsson + + * message.el (message-ignored-subject-re): New variable. + +Wed Jun 3 03:25:13 1998 Sam Steingold + + * gnus-msg.el (gnus-bug-create-help-buffer): New variable. + (gnus-bug): Use it. + +1998-05-07 Hrvoje Niksic + + * nnmail.el: (nnmail-get-split-group): Use `regexp-quote' + when file name is a part of pattern. + + * nnmail.el (nnmail-crosspost-link-function): Ditto. + + * gnus-ems.el: Use `symbol-name' instead of `(format "%s" ...)'. + + * gnus-score.el (gnus-score-load-file): Use `regexp-quote' + when file name is a part of pattern. + +1998-05-06 Hrvoje Niksic + + * gnus-cache.el (gnus-cache-generate-active): Use `regexp-quote' + when file name is a part of pattern. + +Wed Jun 3 03:13:34 1998 Lars Magne Ingebrigtsen + + * nnfolder.el (nnfolder-delete-mail): Changed parameters. + (nnfolder-request-replace-article): Rename X-From-Line. + +Wed Jun 3 03:10:04 1998 Dan Christensen + + * nnfolder.el (nnfolder-adjust-min-active): Work. + +Mon Jun 1 05:27:28 1998 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-limit-to-age): Reversed time and + almost collapsed space! + + * nnmail.el (nnmail-days-to-time): Computed wrong time. + +Mon Jun 1 05:19:46 1998 Kim-Minh Kaplan + + * gnus-sum.el (gnus-dependencies-add-header): Break loops. + +Mon Jun 1 05:13:34 1998 Fabrice POPINEAU + + * gnus-cache.el (gnus-cache-generate-active): Regexp-quote. + Mon Jun 1 04:31:23 1998 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.6.10 is released. diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index a725a9a..04a3ad7 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -607,8 +607,9 @@ If LOW, update the lower bound instead." (if top "" (string-match - (concat "^" (file-name-as-directory - (expand-file-name gnus-cache-directory))) + (concat "^" (regexp-quote + (file-name-as-directory + (expand-file-name gnus-cache-directory)))) (directory-file-name directory)) (nnheader-replace-chars-in-string (substring (directory-file-name directory) (match-end 0)) diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 1404cad..2c002f2 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -184,7 +184,7 @@ (eval-and-compile (let ((case-fold-search t)) (cond - ((string-match "windows-nt\\|os/2\\|emx" (format "%s" system-type)) + ((string-match "windows-nt\\|os/2\\|emx" (symbol-name system-type)) (setq nnheader-file-name-translation-alist (append nnheader-file-name-translation-alist '((?: . ?_) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 96c28a8..d4bfd54 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -2736,11 +2736,10 @@ of groups killed." (if (< (length out) 2) (car out) (nreverse out)))) (defun gnus-group-yank-group (&optional arg) - "Yank the last newsgroups killed with \\[gnus-group-kill-group], -inserting it before the current newsgroup. The numeric ARG specifies -how many newsgroups are to be yanked. The name of the newsgroup yanked -is returned, or (if several groups are yanked) a list of yanked groups -is returned." + "Yank the last newsgroups killed with \\[gnus-group-kill-group], inserting it before the current newsgroup. +The numeric ARG specifies how many newsgroups are to be yanked. The +name of the newsgroup yanked is returned, or (if several groups are +yanked) a list of yanked groups is returned." (interactive "p") (setq arg (or arg 1)) (let (info group prev out) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index ecca916..955dbfa 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -95,6 +95,9 @@ the second with the current group name.") (defvar gnus-message-setup-hook nil "Hook run after setting up a message buffer.") +(defvar gnus-bug-create-help-buffer t + "*Should we create the *Gnus Help Bug* buffer?") + ;;; Internal variables. (defvar gnus-message-buffer "*Mail Gnus*") @@ -505,9 +508,60 @@ If SILENT, don't prompt the user." ;;; as well include the Emacs version as well. ;;; The following function works with later GNU Emacs, and XEmacs. (defun gnus-extended-version () - "Stringified Gnus version" + "Stringified Gnus version and Emacs version." (interactive) - gnus-version) + (concat + gnus-version + "/" + (cond + ((string-match "^\\([0-9]+\\.[0-9]+\\)\\.[.0-9]+$" emacs-version) + (concat "Emacs " (substring emacs-version + (match-beginning 1) + (match-end 1)))) + ((string-match "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?" + emacs-version) + (concat (substring emacs-version + (match-beginning 1) + (match-end 1)) + (format " %d.%d" emacs-major-version emacs-minor-version) + (if (match-beginning 3) + (substring emacs-version + (match-beginning 3) + (match-end 3)) + "") + (if (boundp 'xemacs-codename) + (concat " - \"" xemacs-codename "\"")))) + (t emacs-version)))) + +;; Written by "Mr. Per Persson" . +(defun gnus-inews-insert-mime-headers () + "Insert MIME headers. +Assumes ISO-Latin-1 is used iff 8-bit characters are present." + (goto-char (point-min)) + (let ((mail-header-separator + (progn + (goto-char (point-min)) + (if (and (search-forward (concat "\n" mail-header-separator "\n") + nil t) + (not (search-backward "\n\n" nil t))) + mail-header-separator + "")))) + (or (mail-position-on-field "Mime-Version") + (insert "1.0") + (cond ((save-restriction + (widen) + (goto-char (point-min)) + (re-search-forward "[^\000-\177]" nil t)) + (or (mail-position-on-field "Content-Type") + (insert "text/plain; charset=ISO-8859-1")) + (or (mail-position-on-field "Content-Transfer-Encoding") + (insert "8bit"))) + (t (or (mail-position-on-field "Content-Type") + (insert "text/plain; charset=US-ASCII")) + (or (mail-position-on-field "Content-Transfer-Encoding") + (insert "7bit"))))))) + +(custom-add-option 'message-header-hook 'gnus-inews-insert-mime-headers) ;;; @@ -740,18 +794,20 @@ If YANK is non-nil, include the original article." (error "Gnus has been shut down")) (gnus-setup-message 'bug (delete-other-windows) - (switch-to-buffer (get-buffer-create "*Gnus Help Bug*")) - (erase-buffer) - (insert gnus-bug-message) - (goto-char (point-min)) + (when gnus-bug-create-help-buffer + (switch-to-buffer "*Gnus Help Bug*") + (erase-buffer) + (insert gnus-bug-message) + (goto-char (point-min))) (message-pop-to-buffer "*Gnus Bug*") (message-setup `((To . ,gnus-maintainer) (Subject . ""))) - (push `(gnus-bug-kill-buffer) message-send-actions) + (when gnus-bug-create-help-buffer + (push `(gnus-bug-kill-buffer) message-send-actions)) (goto-char (point-min)) (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$")) (forward-line 1) - (insert (gnus-version) "\n") - (insert (emacs-version) "\n") + (insert (gnus-version) "\n" + (emacs-version) "\n") (when (and (boundp 'nntp-server-type) (stringp nntp-server-type)) (insert nntp-server-type)) diff --git a/lisp/gnus-nocem.el b/lisp/gnus-nocem.el index c7dc5be..d678531 100644 --- a/lisp/gnus-nocem.el +++ b/lisp/gnus-nocem.el @@ -108,8 +108,7 @@ matches an previously scanned and verified nocem message." "Real-name mappings of subscribed groups.") (defun gnus-fill-real-hashtb () - "Fill up a hash table with the real-name mappings from the user's -active file." + "Fill up a hash table with the real-name mappings from the user's active file." (setq gnus-nocem-real-group-hashtb (gnus-make-hashtable (length gnus-newsrc-alist))) (mapcar (lambda (group) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 0628fd5..f324be2 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -1075,8 +1075,9 @@ SCORE is the score to add." ;; Load score file FILE. Returns a list a retrieved score-alists. (let* ((file (expand-file-name (or (and (string-match - (concat "^" (expand-file-name - gnus-kill-files-directory)) + (concat "^" (regexp-quote + (expand-file-name + gnus-kill-files-directory))) (expand-file-name file)) file) (concat (file-name-as-directory gnus-kill-files-directory) @@ -2739,6 +2740,7 @@ The list is determined from the variable gnus-score-file-alist." (interactive (list gnus-global-score-files)) (let (out) (while files + ;; #### /$ Unix-specific? (if (string-match "/$" (car files)) (setq out (nconc (directory-files (car files) t diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 89ea8aa..cf6bb24 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2867,11 +2867,90 @@ If NO-DISPLAY, don't generate a summary buffer." gnus-newsgroup-dependencies))) threads)) +;; Build the thread tree. +(defun gnus-dependencies-add-header (header dependencies force-new) + "Enter HEADER into the DEPENDENCIES table if it is not already there. + +If FORCE-NEW is not NIL, enter HEADER into the DEPENDENCIES table even +if it was already present. + +If `gnus-summary-ignore-duplicates' is NIL then duplicate Message-IDs +will not be entered in the DEPENDENCIES table. Otherwise duplicate +Message-IDs will be renamed be renamed to a unique Message-ID before +being entered. + +Returns HEADER if it was entered in the DEPENDENCIES. Returns NIL otherwise." + + (let* ((id (mail-header-id header)) + (id-dep (and id (intern id dependencies))) + ref ref-dep ref-header) + ;; Enter this `header' in the `dependencies' table + (cond + ((not id-dep) + (setq header nil)) + ;; The first two cases do the normal part : enter a new `header' + ;; in the `dependencies' table, + ((not (boundp id-dep)) + (set id-dep (list header))) + ((null (car (symbol-value id-dep))) + (setcar (symbol-value id-dep) header)) + + ;; From here the `header' was already present in the + ;; `dependencies' table. + + (force-new + ;; Overrides an existing entry, + ;; Just set the header part of the entry. + (setcar (symbol-value id-dep) header)) + + ;; Renames the existing `header' to a unique Message-ID. + ((not gnus-summary-ignore-duplicates) + ;; An article with this Message-ID has already been seen. + ;; We rename the Message-ID. + (set (setq id-dep (intern (setq id (nnmail-message-id)) dependencies)) + (list header)) + (mail-header-set-id header id)) + + ;; - The last case ignores an existing entry, except it adds + ;; any additional Xrefs (in case the two articles came from + ;; different servers. + ;; Also sets `header' to `nil' meaning that the + ;; `dependencies' table was *not* modified. + (t + (mail-header-set-xref + (car (symbol-value id-dep)) + (concat (or (mail-header-xref (car (symbol-value id-dep))) + "") + (or (mail-header-xref header) ""))) + (setq header nil))) + + (when header + ;; First check if that we are not creating a References loop. + (setq ref (gnus-parent-id (mail-header-references header))) + (while (and ref + (setq ref-dep (intern-soft ref dependencies)) + (boundp ref-dep) + (setq ref-header (car (symbol-value ref-dep)))) + (if (string= id ref) + ;; Yuk ! This is a reference loop. Make the article be a + ;; root article. + (progn + (mail-header-set-references (car (symbol-value id-dep)) "none") + (setq ref nil)) + (setq ref (gnus-parent-id (mail-header-references ref-header))))) + (setq ref (gnus-parent-id (mail-header-references header))) + (setq ref-dep (intern (or ref "none") dependencies)) + (if (boundp ref-dep) + (setcdr (symbol-value ref-dep) + (nconc (cdr (symbol-value ref-dep)) + (list (symbol-value id-dep)))) + (set ref-dep (list nil (symbol-value id-dep))))) + header)) + (defun gnus-build-sparse-threads () (let ((headers gnus-newsgroup-headers) - (deps gnus-newsgroup-dependencies) header references generation relations - cthread subject child end pthread relation new-child children) + cthread subject child end pthread relation new-child) ;; First we create an alist of generations/relations, where ;; generations is how much we trust the relation, and the relation ;; is parent/child. @@ -2887,51 +2966,28 @@ If NO-DISPLAY, don't generate a summary buffer." (setq generation 0) (while (search-backward ">" nil t) (setq end (1+ (point))) - (when (search-backward "<" nil t) - ;; This is a rather weak for of loop-checking, but if - ;; an article contains the same Message-ID twice in - ;; the References header, this will catch it. I haven't - ;; considered other forms of thread loop preventions, - ;; though -- I think one should probably go through - ;; the entire thread after building it and break - ;; any loops that are found. - (unless (member (setq new-child (buffer-substring (point) end)) - children) + (if (search-backward "<" nil t) (push (list (incf generation) child (setq child new-child) subject) - relations) - (push child children)))) + relations))) (push (list (1+ generation) child nil subject) relations) (erase-buffer))) (kill-buffer (current-buffer))) ;; Sort over trustworthiness. - (setq relations (sort relations 'car-less-than-car)) - (while (setq relation (pop relations)) - (when (if (boundp (setq cthread (intern (cadr relation) deps))) - (unless (car (symbol-value cthread)) - ;; Make this article the parent of these threads. - (setcar (symbol-value cthread) - (vector gnus-reffed-article-number - (cadddr relation) - "" "" - (cadr relation) - (or (caddr relation) "") 0 0 ""))) - (set cthread (list (vector gnus-reffed-article-number - (cadddr relation) - "" "" (cadr relation) - (or (caddr relation) "") 0 0 "")))) - (push gnus-reffed-article-number gnus-newsgroup-limit) - (push gnus-reffed-article-number gnus-newsgroup-sparse) - (push (cons gnus-reffed-article-number gnus-sparse-mark) - gnus-newsgroup-reads) - (decf gnus-reffed-article-number) - ;; Make this new thread the child of its parent. - (if (boundp (setq pthread (intern (or (caddr relation) "none") deps))) - (setcdr (symbol-value pthread) - (nconc (cdr (symbol-value pthread)) - (list (symbol-value cthread)))) - (set pthread (list nil (symbol-value cthread)))))) + (mapc #'(lambda (relation) + (when (gnus-dependencies-add-header + (make-full-mail-header gnus-reffed-article-number + (cadddr relation) + "" "" (cadr relation) + (or (caddr relation) "") 0 0 "") + gnus-newsgroup-dependencies nil) + (push gnus-reffed-article-number gnus-newsgroup-limit) + (push gnus-reffed-article-number gnus-newsgroup-sparse) + (push (cons gnus-reffed-article-number gnus-sparse-mark) + gnus-newsgroup-reads) + (decf gnus-reffed-article-number))) + (sort relations 'car-less-than-car)) (gnus-message 7 "Making sparse threads...done"))) (defun gnus-build-old-threads () @@ -2950,8 +3006,7 @@ If NO-DISPLAY, don't generate a summary buffer." (setq heads (cdr heads)) (setq id (symbol-name refs)) (while (and (setq id (gnus-build-get-header id)) - (not (car (gnus-gethash - id gnus-newsgroup-dependencies))))) + (not (car (gnus-id-to-thread id))))) (setq heads nil))))) gnus-newsgroup-dependencies))) @@ -2959,8 +3014,7 @@ If NO-DISPLAY, don't generate a summary buffer." ;; Look through the buffer of NOV lines and find the header to ;; ID. Enter this line into the dependencies hash table, and return ;; the id of the parent article (if any). - (let ((deps gnus-newsgroup-dependencies) - found header) + (let (found header) (prog1 (save-excursion (set-buffer nntp-server-buffer) @@ -2976,8 +3030,8 @@ If NO-DISPLAY, don't generate a summary buffer." (when found (beginning-of-line) (and - (setq header (gnus-nov-parse-line - (read (current-buffer)) deps)) + (setq header (gnus-nov-parse-line (read (current-buffer)) + gnus-newsgroup-dependencies)) (gnus-parent-id (mail-header-references header)))))) (when header (let ((number (mail-header-number header))) @@ -2992,8 +3046,7 @@ If NO-DISPLAY, don't generate a summary buffer." (defun gnus-build-all-threads () "Read all the headers." - (let ((deps gnus-newsgroup-dependencies) - (gnus-summary-ignore-duplicates t) + (let ((gnus-summary-ignore-duplicates t) found header article) (save-excursion (set-buffer nntp-server-buffer) @@ -3002,7 +3055,8 @@ If NO-DISPLAY, don't generate a summary buffer." (while (not (eobp)) (ignore-errors (setq article (read (current-buffer))) - (setq header (gnus-nov-parse-line article deps))) + (setq header (gnus-nov-parse-line article + gnus-newsgroup-dependencies))) (when header (push header gnus-newsgroup-headers) (if (memq (setq article (mail-header-number header)) @@ -3188,8 +3242,7 @@ If NO-DISPLAY, don't generate a summary buffer." (defun gnus-root-id (id) "Return the id of the root of the thread where ID appears." (let (last-id prev) - (while (and id (setq prev (car (gnus-gethash - id gnus-newsgroup-dependencies)))) + (while (and id (setq prev (car (gnus-id-to-thread id)))) (setq last-id id id (gnus-parent-id (mail-header-references prev)))) last-id)) @@ -3201,8 +3254,7 @@ If NO-DISPLAY, don't generate a summary buffer." (defun gnus-remove-thread (id &optional dont-remove) "Remove the thread that has ID in it." - (let ((dep gnus-newsgroup-dependencies) - headers thread last-id) + (let (headers thread last-id) ;; First go up in this thread until we find the root. (setq last-id (gnus-root-id id)) (setq headers (list (car (gnus-id-to-thread last-id)) @@ -3235,7 +3287,7 @@ If NO-DISPLAY, don't generate a summary buffer." (if thread (unless dont-remove (setq gnus-newsgroup-threads (delq thread gnus-newsgroup-threads))) - (setq thread (gnus-gethash last-id dep))) + (setq thread (gnus-id-to-thread last-id))) (when thread (prog1 thread ; We return this thread. @@ -3400,8 +3452,7 @@ Unscored articles will be counted as having a score of zero." (apply gnus-thread-score-function (or (append (mapcar 'gnus-thread-total-score - (cdr (gnus-gethash (mail-header-id root) - gnus-newsgroup-dependencies))) + (cdr (gnus-id-to-thread (mail-header-id root)))) (when (> (mail-header-number root) 0) (list (or (cdr (assq (mail-header-number root) gnus-newsgroup-scored)) @@ -4350,43 +4401,11 @@ The resulting hash table is returned, or nil if no Xrefs were found." (funcall gnus-alter-header-function header) (setq id (mail-header-id header) ref (gnus-parent-id (mail-header-references header)))) - - ;; We do the threading while we read the headers. The - ;; message-id and the last reference are both entered into - ;; the same hash table. Some tippy-toeing around has to be - ;; done in case an article has arrived before the article - ;; which it refers to. - (if (boundp (setq id-dep (intern id dependencies))) - (if (and (car (symbol-value id-dep)) - (not force-new)) - ;; An article with this Message-ID has already been seen. - (if gnus-summary-ignore-duplicates - ;; We ignore this one, except we add - ;; any additional Xrefs (in case the two articles - ;; came from different servers). - (progn - (mail-header-set-xref - (car (symbol-value id-dep)) - (concat (or (mail-header-xref - (car (symbol-value id-dep))) - "") - (or (mail-header-xref header) ""))) - (setq header nil)) - ;; We rename the Message-ID. - (set - (setq id-dep (intern (setq id (nnmail-message-id)) - dependencies)) - (list header)) - (mail-header-set-id header id)) - (setcar (symbol-value id-dep) header)) - (set id-dep (list header))) - (when header - (if (boundp (setq ref-dep (intern (or ref "none") dependencies))) - (setcdr (symbol-value ref-dep) - (nconc (cdr (symbol-value ref-dep)) - (list (symbol-value id-dep)))) - (set ref-dep (list nil (symbol-value id-dep)))) - (push header headers)) + + (setq header + (gnus-dependencies-add-header header dependencies force-new)) + (if header + (push header headers)) (goto-char (point-max)) (widen)) (nreverse headers))))) @@ -4426,73 +4445,31 @@ The resulting hash table is returned, or nil if no Xrefs were found." (forward-char)) (setq header - (vector + (make-full-mail-header number ; number (funcall gnus-unstructured-field-decoder (gnus-nov-field)) ; subject (funcall gnus-structured-field-decoder (gnus-nov-field)) ; from (gnus-nov-field) ; date - (setq id (or (gnus-nov-field) - (nnheader-generate-fake-message-id))) ; id - (progn - (let ((beg (point))) - (search-forward "\t" eol) - (if (search-backward ">" beg t) - (setq ref - (buffer-substring - (1+ (point)) - (or (search-backward "<" beg t) beg))) - (setq ref nil)) - (goto-char beg)) - (gnus-nov-field)) ; refs + (or (gnus-nov-field) + (nnheader-generate-fake-message-id)) ; id + (gnus-nov-field) ; refs (gnus-nov-read-integer) ; chars (gnus-nov-read-integer) ; lines - (if (= (following-char) ?\n) - nil + (unless (= (following-char) ?\n) (gnus-nov-field))))) ; misc (widen)) (when gnus-alter-header-function - (funcall gnus-alter-header-function header) - (setq id (mail-header-id header) - ref (gnus-parent-id (mail-header-references header)))) - - ;; We build the thread tree. - (when (equal id ref) - ;; This article refers back to itself. Naughty, naughty. - (setq ref nil)) - (if (boundp (setq id-dep (intern id dependencies))) - (if (and (car (symbol-value id-dep)) - (not force-new)) - ;; An article with this Message-ID has already been seen. - (if gnus-summary-ignore-duplicates - ;; We ignore this one, except we add any additional - ;; Xrefs (in case the two articles came from different - ;; servers. - (progn - (mail-header-set-xref - (car (symbol-value id-dep)) - (concat (or (mail-header-xref - (car (symbol-value id-dep))) - "") - (or (mail-header-xref header) ""))) - (setq header nil)) - ;; We rename the Message-ID. - (set - (setq id-dep (intern (setq id (nnmail-message-id)) - dependencies)) - (list header)) - (mail-header-set-id header id)) - (setcar (symbol-value id-dep) header)) - (set id-dep (list header))) - (when header - (if (boundp (setq ref-dep (intern (or ref "none") dependencies))) - (setcdr (symbol-value ref-dep) - (nconc (cdr (symbol-value ref-dep)) - (list (symbol-value id-dep)))) - (set ref-dep (list nil (symbol-value id-dep))))) + (funcall gnus-alter-header-function header)) + + (setq id (mail-header-id header) + ref (gnus-parent-id (mail-header-references header))) + + (gnus-dependencies-add-header header dependencies force-new) + header)) ;; Goes through the xover lines and returns a list of vectors @@ -4622,9 +4599,9 @@ This is meant to be called in `gnus-article-internal-prepare-hook'." ;;; Process/prefix in the summary buffer (defun gnus-summary-work-articles (n) - "Return a list of articles to be worked upon. The prefix argument, -the list of process marked articles, and the current article will be -taken into consideration." + "Return a list of articles to be worked upon. +The prefix argument, the list of process marked articles, and the +current article will be taken into consideration." (save-excursion (set-buffer gnus-summary-buffer) (cond @@ -5140,8 +5117,8 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil." (gnus-handle-ephemeral-exit quit-config))))) (defun gnus-handle-ephemeral-exit (quit-config) - "Handle movement when leaving an ephemeral group. The state -which existed when entering the ephemeral is reset." + "Handle movement when leaving an ephemeral group. +The state which existed when entering the ephemeral is reset." (if (not (buffer-name (car quit-config))) (gnus-configure-windows 'group 'force) (set-buffer (car quit-config)) @@ -5928,7 +5905,9 @@ articles that are younger than AGE days." (setq is-younger (nnmail-time-less (nnmail-time-since (nnmail-date-to-time date)) cutoff)) - (when (if younger-p is-younger (not is-younger)) + (when (if younger-p + (not is-younger) + is-younger) (push (gnus-data-number d) articles)))) (gnus-summary-limit (nreverse articles))) (gnus-summary-position-point))) @@ -8747,9 +8726,7 @@ save those articles instead." (when (and header (gnus-summary-article-sparse-p (mail-header-number header))) (let* ((parent (gnus-parent-id (mail-header-references header))) - (thread - (and parent - (gnus-gethash parent gnus-newsgroup-dependencies)))) + (thread (and parent (gnus-id-to-thread parent)))) (when thread (delq (assq header thread) thread)))) ;; We have to really fetch the header to this article. diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index a3d239e..249367d 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -355,8 +355,8 @@ with some simple extensions. ;;; Generating group buffers (defun gnus-group-prepare-topics (level &optional all lowest regexp list-topic topic-level) - "List all newsgroups with unread articles of level LEVEL or lower, and -use the `gnus-group-topics' to sort the groups. + "List all newsgroups with unread articles of level LEVEL or lower. +Use the `gnus-group-topics' to sort the groups. If ALL is non-nil, list groups that have no unread articles. If LOWEST is non-nil, list all newsgroups of level LOWEST or higher." (set-buffer gnus-group-buffer) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index e375f42..1665191 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -341,7 +341,7 @@ (message ""))) (defun gnus-dd-mmm (messy-date) - "Return a string like DD-MMM from a big messy string" + "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))) @@ -376,7 +376,7 @@ Cache the result as a text property stored in DATE." (format-time-string "%Y%m%dT%H%M%S" time)) (defun gnus-date-iso8601 (date) - "Convert the DATE to YYMMDDTHHMMSS" + "Convert the DATE to YYMMDDTHHMMSS." (condition-case () (gnus-time-iso8601 (gnus-date-get-time date)) (error ""))) diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index b341583..7b28e53 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -648,7 +648,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (gnus-summary-position-point)) (defun gnus-uu-mark-over (&optional score) - "Mark all articles with a score over SCORE (the prefix.)" + "Mark all articles with a score over SCORE (the prefix)." (interactive "P") (let ((score (gnus-score-default score)) (data gnus-newsgroup-data)) @@ -1901,8 +1901,10 @@ If no file has been included, the user will be asked for a file." (goto-char (point-max)) (insert (format "\n%s\n" gnus-uu-post-binary-separator)) + ;; #### Unix-specific? (when (string-match "^~/" file-path) (setq file-path (concat "$HOME" (substring file-path 1)))) + ;; #### Unix-specific? (if (string-match "/[^/]*$" file-path) (setq file-name (substring file-path (1+ (match-beginning 0)))) (setq file-name file-path)) diff --git a/lisp/gnus.el b/lisp/gnus.el index 8064a47..ae5931c 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -250,7 +250,7 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "6.3.2" +(defconst gnus-version-number "6.3.3" "Version number for this version of gnus.") (defconst gnus-version @@ -2696,7 +2696,7 @@ Allow completion over sensible values." ;;;###autoload (defun gnus-slave-no-server (&optional arg) - "Read network news as a slave, without connecting to local server" + "Read network news as a slave, without connecting to local server." (interactive "P") (gnus-no-server arg t)) diff --git a/lisp/message.el b/lisp/message.el index 3b6d098..08fac7d 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -227,6 +227,11 @@ any confusion." :group 'message-interface :type 'regexp) +(defcustom message-subject-re-regexp "^[ \t]*\\([Rr][Ee]:[ \t]*\\)*[ \t]*" + "*Regexp matching \"Re: \" in the subject line." + :group 'message-various + :type 'regexp) + ;;;###autoload (defcustom message-signature-separator "^-- *$" "Regexp matching the signature separator." @@ -1047,7 +1052,7 @@ The cdr of ech entry is a function for applying the face to a region.") (defun message-strip-subject-re (subject) "Remove \"Re:\" from subject lines." - (if (string-match "^[Rr][Ee]: *" subject) + (if (string-match message-subject-re-regexp subject) (substring subject (match-end 0)) subject)) @@ -1927,7 +1932,7 @@ the user from the mailer." t)))) (defun message-send-via-mail (arg) - "Send the current message via mail." + "Send the current message via mail." (message-send-mail arg)) (defun message-send-via-news (arg) @@ -3397,7 +3402,7 @@ Headers already prepared in the buffer are not modified." message-id (message-fetch-field "message-id" t)) ;; Remove any (buggy) Re:'s that are present and make a ;; proper one. - (when (string-match "^[ \t]*[Rr][Ee]:[ \t]*" subject) + (when (string-match message-subject-re-regexp subject) (setq subject (substring subject (match-end 0)))) (setq subject (concat "Re: " subject)) @@ -3518,7 +3523,7 @@ If TO-NEWSGROUPS, use that as the new Newsgroups line." (setq distribution nil)) ;; Remove any (buggy) Re:'s that are present and make a ;; proper one. - (when (string-match "^[ \t]*[Rr][Ee]:[ \t]*" subject) + (when (string-match message-subject-re-regexp subject) (setq subject (substring subject (match-end 0)))) (setq subject (concat "Re: " subject)) (widen)) diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index 11cfcd4..334b2b6 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -396,12 +396,15 @@ time saver for large mailboxes.") (nnfolder-possibly-change-group group) (save-excursion (set-buffer buffer) + (goto-char (point-min)) + (when (looking-at "X-From-Line: ") + (replace-match "From ")) (nnfolder-normalize-buffer) (set-buffer nnfolder-current-buffer) (goto-char (point-min)) (if (not (nnfolder-goto-article article)) nil - (nnfolder-delete-mail t t) + (nnfolder-delete-mail t) (insert-buffer-substring buffer) (nnfolder-save-buffer) t))) @@ -463,10 +466,9 @@ time saver for large mailboxes.") (goto-char (point-min)) (while (and (search-forward marker nil t) (re-search-forward number nil t)) - (setq activemin (min activemin - (string-to-number (buffer-substring - (match-beginning 0) - (match-end 0)))))) + (let ((newnum (string-to-number (match-string 0)))) + (if (nnmail-within-headers-p) + (setq activemin (min activemin newnum))))) (setcar active activemin)))) (defun nnfolder-article-string (article) @@ -498,19 +500,21 @@ Returns t if successful, nil otherwise." (when found (nnmail-search-unix-mail-delim-backward)))) -(defun nnfolder-delete-mail (&optional force leave-delim) - "Delete the message that point is in." - (save-excursion - (delete-region - (save-excursion - (nnmail-search-unix-mail-delim-backward) - (if leave-delim (progn (forward-line 1) (point)) - (point))) - (progn - (forward-line 1) - (if (nnmail-search-unix-mail-delim) - (point) - (point-max)))))) +(defun nnfolder-delete-mail (&optional leave-delim) + "Delete the message that point is in. +If optional argument LEAVE-DELIM is t, then mailbox delimiter is not +deleted. Point is left where the deleted region was." + (delete-region + (save-excursion + (forward-line 1) ; in case point is at beginning of message already + (nnmail-search-unix-mail-delim-backward) + (if leave-delim (progn (forward-line 1) (point)) + (point))) + (progn + (forward-line 1) + (if (nnmail-search-unix-mail-delim) + (point) + (point-max))))) (defun nnfolder-possibly-change-group (group &optional server dont-check) ;; Change servers. diff --git a/lisp/nnkiboze.el b/lisp/nnkiboze.el index 062806d..0df788d 100644 --- a/lisp/nnkiboze.el +++ b/lisp/nnkiboze.el @@ -182,7 +182,7 @@ ;;;###autoload (defun nnkiboze-generate-groups () - "Usage: emacs -batch -l nnkiboze -f nnkiboze-generate-groups + "\"Usage: emacs -batch -l nnkiboze -f nnkiboze-generate-groups\". Finds out what articles are to be part of the nnkiboze groups." (interactive) (let ((nnmail-spool-file nil) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 7af5f34..516e8b1 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -218,7 +218,7 @@ several files - eg. \".spool[0-9]*\"." :type 'function) (defcustom nnmail-crosspost-link-function - (if (string-match "windows-nt\\|emx" (format "%s" system-type)) + (if (string-match "windows-nt\\|emx" (symbol-name system-type)) 'copy-file 'add-name-to-file) "*Function called to create a copy of a file. @@ -541,7 +541,7 @@ parameter. It should return nil, `warn' or `delete'." "Convert DAYS into time." (let* ((seconds (* 1.0 days 60 60 24)) (rest (expt 2 16)) - (ms (condition-case nil (round (/ seconds rest)) + (ms (condition-case nil (floor (/ seconds rest)) (range-error (expt 2 16))))) (list ms (condition-case nil (round (- seconds (* ms rest))) (range-error (expt 2 16)))))) @@ -717,10 +717,12 @@ return nil if FILE is a spool file or the procmail group for which it is a spool. If not using procmail, return GROUP." (if (or (eq nnmail-spool-file 'procmail) nnmail-use-procmail) - (if (string-match (concat "^" (expand-file-name - (file-name-as-directory - nnmail-procmail-directory)) - "\\([^/]*\\)" nnmail-procmail-suffix "$") + (if (string-match (concat "^" (regexp-quote + (expand-file-name + (file-name-as-directory + nnmail-procmail-directory))) + "\\([^/]*\\)" + (regexp-quote nnmail-procmail-suffix) "$") (expand-file-name file)) (let ((procmail-group (substring (expand-file-name file) (match-beginning 1) diff --git a/texi/ChangeLog b/texi/ChangeLog index 43c1736..1e7d48d 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 3 03:30:47 1998 Lars Magne Ingebrigtsen + + * message.texi (Message Headers): Addition. + + * gnus.texi (Compatibility): Addition. + Tue May 19 02:44:31 1998 Mike Pullen * gnus.texi.orig: Typo fixes. diff --git a/texi/gnus.texi b/texi/gnus.texi index 8c552c5..a226077 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Semi-gnus 6.3.0 Manual +@settitle Semi-gnus 6.3.3 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -316,7 +316,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Semi-gnus 6.3.0 Manual +@title Semi-gnus 6.3.3 Manual @author by Lars Magne Ingebrigtsen @page @@ -359,7 +359,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.3.0. +This manual corresponds to Semi-gnus 6.3.3. @end ifinfo @@ -15379,6 +15379,12 @@ Overall, a casual user who hasn't written much code that depends on @sc{gnus} internals should suffer no problems. If problems occur, please let me know by issuing that magic command @kbd{M-x gnus-bug}. +@vindex gnus-bug-create-help-buffer +If you are in the habit of sending bug reports @emph{very} often, you +may find the helpful help buffer annoying after a while. If so, set +@code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop +up at you. + @node Conformity @subsection Conformity @@ -15565,6 +15571,7 @@ Russ Allbery, Peter Arius, Matt Armstrong, Marc Auslander, +Frank Bennett, Robert Bihlmeyer, Chris Bone, Mark Borges, @@ -15572,6 +15579,7 @@ Mark Boyns, Lance A. Brown, Kees de Bruin, Martin Buchholz, +Joe Buehler, Kevin Buhr, Alastair Burt, Joao Cachopo, @@ -15606,6 +15614,8 @@ D. Hall, Magnus Hammerin, Kenichi Handa, @c Handa Raja R. Harinath, +Yoshiki Hayashi, @c ? +P. E. Jareth Hein, Hisashige Kenji, @c Hisashige Marc Horowitz, Gunnar Horrigmo, @@ -15632,12 +15642,13 @@ James LewisMoss, Christian Limpach, Markus Linnala, Dave Love, +Mike McEwan, Tonny Madsen, Shlomo Mahlab, Nat Makarevitch, Istvan Marko, David Martin, -Jason R Mastaler, +Jason R. Mastaler, Gordon Matzigkeit, Timo Metzemakers, Richard Mlynarik, @@ -15657,6 +15668,8 @@ Stephen Peters, Jens-Ulrik Holger Petersen, Ulrich Pfeifer, John McClary Prevost, +Mike Pullen, +Jim Radford, Colin Rafferty, Lasse Rasinen, Lars Balker Rasmussen, @@ -15666,6 +15679,7 @@ Roland B. Roberts, Bart Robinson, Christian von Roques, Jason Rumney, +Wolfgang Rupprecht, Jay Sachs, Dewey M. Sasser, Loren Schall, @@ -15722,7 +15736,7 @@ actually are people who are using Gnus. Who'd'a thunk it! * ding Gnus:: New things in Gnus 5.0/5.1, the first new Gnus. * September Gnus:: The Thing Formally Known As Gnus 5.3/5.3. * Red Gnus:: Third time best---Gnus 5.4/5.5. -* Quassia Gnus:: Two times two is four, or Gnus 5.6.10. +* Quassia Gnus:: Two times two is four, or Gnus 5.6.11. @end menu These lists are, of course, just @emph{short} overviews of the @@ -16257,7 +16271,7 @@ Emphasized text can be properly fontisized: @node Quassia Gnus @subsubsection Quassia Gnus -New features in Gnus 5.6.10: +New features in Gnus 5.6.11: @itemize @bullet diff --git a/texi/message.texi b/texi/message.texi index 2484235..cdb63f4 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Message 5.6.10 Manual +@settitle Message 5.6.11 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 Message 5.6.10 Manual +@title Message 5.6.11 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 Message 5.6.10. Message is distributed with +This manual corresponds to Message 5.6.11. Message is distributed with the Gnus distribution bearing the same version number as this manual has. @@ -717,6 +717,18 @@ Allegedly. This string is inserted at the end of the headers in all message buffers. +@item message-subject-re-regexp +@vindex message-subject-re-regexp +Responses to messages have subjects that start with @samp{Re: }. This +is @emph{not} an abbreviation of the English word ``response'', but in +Latin, and means ``in response to''. Some illiterate nincompoops have +failed to grasp this fact, and have ``internationalized'' their software +to use abonimations like @samp{Aw: } (``antwort'') or @samp{Sv: } +(``svar'') instead, which is meaningless and evil. However, you may +have to deal with users that use these evil tools, in which case you may +set this variable to a regexp that matches these prefixes. Myself, I +just throw away non-compliant mail. + @end table