From: shuhei-k Date: Fri, 26 Jun 1998 12:20:00 +0000 (+0000) Subject: Synch up to Semi-gnus 6.7.2. X-Git-Tag: semi-mule-199811302358~55 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5d86f9c7a1a1b3b2bafa4b2a49be5277cf51ee2;p=elisp%2Fgnus.git- Synch up to Semi-gnus 6.7.2. --- diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 5012254..2cd3f7b 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2008,11 +2008,6 @@ If ALL-HEADERS is non-nil, no headers are hidden." (unless (eq major-mode 'gnus-summary-mode) (set-buffer gnus-summary-buffer)) (setq gnus-summary-buffer (current-buffer)) - ;; Make sure the connection to the server is alive. - (unless (gnus-server-opened - (gnus-find-method-for-group gnus-newsgroup-name)) - (gnus-check-server (gnus-find-method-for-group gnus-newsgroup-name)) - (gnus-request-group gnus-newsgroup-name t)) (let* ((gnus-article (if header (mail-header-number header) article)) (summary-buffer (current-buffer)) (internal-hook gnus-article-internal-prepare-hook) @@ -2280,7 +2275,8 @@ Argument LINES specifies lines to be scrolled down." (error "There is no summary buffer for this article buffer") (gnus-article-set-globals) (gnus-configure-windows 'article) - (gnus-summary-goto-subject gnus-current-article))) + (gnus-summary-goto-subject gnus-current-article) + (gnus-summary-position-point))) (defun gnus-article-describe-briefly () "Describe article mode commands briefly." @@ -2392,6 +2388,13 @@ If given a prefix, show the hidden text instead." (when (gnus-visual-p 'article-highlight 'highlight) (gnus-article-highlight-some))) +(defun gnus-check-group-server () + ;; Make sure the connection to the server is alive. + (unless (gnus-server-opened + (gnus-find-method-for-group gnus-newsgroup-name)) + (gnus-check-server (gnus-find-method-for-group gnus-newsgroup-name)) + (gnus-request-group gnus-newsgroup-name t))) + (defun gnus-request-article-this-buffer (article group) "Get an article and insert it into this buffer." (let (do-update-line) @@ -2401,9 +2404,6 @@ If given a prefix, show the hidden text instead." (gnus-kill-all-overlays) (setq group (or group gnus-newsgroup-name)) - ;; Open server if it has closed. - (gnus-check-server (gnus-find-method-for-group group)) - ;; Using `gnus-request-article' directly will insert the article into ;; `nntp-server-buffer' - so we'll save some time by not having to ;; copy it from the server buffer into the article buffer. @@ -2494,6 +2494,7 @@ If given a prefix, show the hidden text instead." (buffer-read-only nil)) (erase-buffer) (gnus-kill-all-overlays) + (gnus-check-group-server) (when (gnus-request-article article group (current-buffer)) (when (numberp article) (gnus-async-prefetch-next group article gnus-summary-buffer) @@ -2546,9 +2547,6 @@ If given a prefix, show the hidden text instead." (gnus-kill-all-overlays) (setq group (or group gnus-newsgroup-name)) - ;; Open server if it has closed. - (gnus-check-server (gnus-find-method-for-group group)) - ;; Using `gnus-request-article' directly will insert the article into ;; `nntp-server-buffer' - so we'll save some time by not having to ;; copy it from the server buffer into the article buffer. @@ -2630,6 +2628,7 @@ If given a prefix, show the hidden text instead." (buffer-read-only nil)) (erase-buffer) (gnus-kill-all-overlays) + (gnus-check-group-server) (when (gnus-request-article article group (current-buffer)) (when (numberp article) (gnus-async-prefetch-next group article gnus-summary-buffer) diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 20f5ebe..5f6fdf6 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -409,7 +409,8 @@ Returns the list of articles removed." (defun gnus-cache-update-article (group article) "If ARTICLE is in the cache, remove it and re-enter it." - (when (gnus-cache-possibly-remove-article article nil nil nil t) + (gnus-cache-change-buffer group) + (when (gnus-cache-possibly-remove-article article nil nil nil t) (let ((gnus-use-cache nil)) (gnus-cache-possibly-enter-article gnus-newsgroup-name article (gnus-summary-article-header article) diff --git a/lisp/gnus-cus.el b/lisp/gnus-cus.el index 4416895..1bd882d 100644 --- a/lisp/gnus-cus.el +++ b/lisp/gnus-cus.el @@ -651,4 +651,3 @@ articles in the thread. (provide 'gnus-cus) ;;; gnus-cus.el ends here - diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 338b99d..b01a970 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -427,12 +427,19 @@ header line with the old Message-ID." (push (list 'gnus-inews-add-to-address pgroup) message-send-actions))) (set-buffer gnus-article-copy) - (message-wide-reply to-address - (gnus-group-find-parameter - gnus-newsgroup-name 'broken-reply-to)))) + (gnus-msg-treat-broken-reply-to) + (message-wide-reply to-address))) (when yank (gnus-inews-yank-articles yank)))))) +(defun gnus-msg-treat-broken-reply-to () + "Remove the Reply-to header iff broken-reply-to." + (when (gnus-group-find-parameter + gnus-newsgroup-name 'broken-reply-to) + (save-restriction + (message-narrow-to-head) + (message-remove-header "reply-to")))) + (defun gnus-post-method (arg group &optional silent) "Return the posting method based on GROUP and ARG. If SILENT, don't prompt the user." @@ -462,6 +469,7 @@ If SILENT, don't prompt the user." gnus-post-method (list gnus-post-method))) gnus-secondary-select-methods + (mapcar 'cdr gnus-server-alist) (list gnus-select-method) (list group-method))) method-alist post-methods method) @@ -550,8 +558,8 @@ automatically." (gnus-setup-message (if yank 'reply-yank 'reply) (gnus-summary-select-article) (set-buffer (gnus-copy-article-buffer)) - (message-reply nil wide (gnus-group-find-parameter - gnus-newsgroup-name 'broken-reply-to)) + (gnus-msg-treat-broken-reply-to) + (message-reply nil wide) (when yank (gnus-inews-yank-articles yank))))) diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index 1efaa60..9a56f37 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -77,18 +77,18 @@ It accepts the same format specs that `gnus-summary-line-format' does." "." gnus-pick-article gnus-down-mouse-2 gnus-pick-mouse-pick-region "\r" gnus-pick-start-reading - ;; "t" gnus-uu-mark-thread - ;; "T" gnus-uu-unmark-thread - ;; "U" gnus-summary-unmark-all-processable - ;; "v" gnus-uu-mark-over - ;; "r" gnus-uu-mark-region - ;; "R" gnus-uu-unmark-region - ;; "e" gnus-uu-mark-by-regexp - ;; "E" gnus-uu-mark-by-regexp - ;; "b" gnus-uu-mark-buffer - ;; "B" gnus-uu-unmark-buffer - ;;gnus-mouse-2 gnus-pick-mouse-pick - ;; "X" gnus-pick-start-reading + "t" gnus-uu-mark-thread + "T" gnus-uu-unmark-thread + "U" gnus-summary-unmark-all-processable + "v" gnus-uu-mark-over + "r" gnus-uu-mark-region + "R" gnus-uu-unmark-region + "e" gnus-uu-mark-by-regexp + "E" gnus-uu-mark-by-regexp + "b" gnus-uu-mark-buffer + "B" gnus-uu-unmark-buffer + gnus-mouse-2 gnus-pick-mouse-pick + "X" gnus-pick-start-reading )) (defun gnus-pick-make-menu-bar () diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index f324be2..08bf0f0 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -454,7 +454,6 @@ of the last successful match.") (gnus-define-keys (gnus-summary-score-map "V" gnus-summary-mode-map) "s" gnus-summary-set-score - "a" gnus-summary-score-entry "S" gnus-summary-current-score "c" gnus-score-change-score-file "C" gnus-score-customize @@ -752,20 +751,6 @@ SCORE is the score to add. DATE is the expire date, or nil for no expire, or 'now for immediate expire. If optional argument `PROMPT' is non-nil, allow user to edit match. If optional argument `SILENT' is nil, show effect of score entry." - (interactive - (list (completing-read "Header: " - gnus-header-index - (lambda (x) (fboundp (nth 2 x))) - t) - (read-string "Match: ") - (if (y-or-n-p "Use regexp match? ") 'r 's) - (and current-prefix-arg - (prefix-numeric-value current-prefix-arg)) - (cond ((not (y-or-n-p "Add to score file? ")) - 'now) - ((y-or-n-p "Expire kill? ") - (current-time-string)) - (t nil)))) ;; Regexp is the default type. (when (eq type t) (setq type 'r)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 6a4782e..da62750 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -34,7 +34,6 @@ (require 'gnus-range) (require 'gnus-int) (require 'gnus-undo) -(require 'std11) (require 'mime-view) (autoload 'gnus-summary-limit-include-cached "gnus-cache" nil t) @@ -2949,7 +2948,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (defun gnus-build-sparse-threads () (let ((headers gnus-newsgroup-headers) header references generation relations - cthread subject child end pthread relation new-child) + cthread subject child end pthread relation new-child date) ;; First we create an alist of generations/relations, where ;; generations is how much we trust the relation, and the relation ;; is parent/child. @@ -2961,14 +2960,15 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (not (string= references ""))) (insert references) (setq child (mail-header-id header) - subject (mail-header-subject header)) - (setq generation 0) + subject (mail-header-subject header) + date (mail-header-date header) + generation 0) (while (search-backward ">" nil t) (setq end (1+ (point))) (if (search-backward "<" nil t) (push (list (incf generation) child (setq child new-child) - subject) + subject date) relations))) (push (list (1+ generation) child nil subject) relations) (erase-buffer))) @@ -2979,9 +2979,9 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (when (gnus-dependencies-add-header (make-full-mail-header gnus-reffed-article-number - (cadddr relation) "" (mail-header-date header) - (cadr relation) - (or (caddr relation) "") 0 0 "") + (nth 3 relation) "" (nth 4 relation) + (nth 1 relation) + (or (nth 2 relation) "") 0 0 "") gnus-newsgroup-dependencies nil) (push gnus-reffed-article-number gnus-newsgroup-limit) (push gnus-reffed-article-number gnus-newsgroup-sparse) @@ -3210,8 +3210,9 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (setcar thread old) nil)))) -(defun gnus-rebuild-thread (id) - "Rebuild the thread containing ID." +(defun gnus-rebuild-thread (id &optional line) + "Rebuild the thread containing ID. +If LINE, insert the rebuilt thread starting on line LINE." (let ((buffer-read-only nil) old-pos current thread data) (if (not gnus-show-threads) @@ -3241,6 +3242,9 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (setq thread (cons subject (gnus-sort-threads roots)))))) (let (threads) ;; We then insert this thread into the summary buffer. + (when line + (goto-char (point-min)) + (forward-line (1- line))) (let (gnus-newsgroup-data gnus-newsgroup-threads) (if gnus-show-threads (gnus-summary-prepare-threads (gnus-cut-threads (list thread))) @@ -3248,8 +3252,14 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (setq data (nreverse gnus-newsgroup-data)) (setq threads gnus-newsgroup-threads)) ;; We splice the new data into the data structure. - (gnus-data-enter-list current data (- (point) old-pos)) - (setq gnus-newsgroup-threads (nconc threads gnus-newsgroup-threads))))) + ;;!!! This is kinda bogus. We assume that in LINE is non-nil, + ;;!!! then we want to insert at the beginning of the buffer. + ;;!!! That happens to be true with Gnus now, but that may + ;;!!! change in the future. Perhaps. + (gnus-data-enter-list (if line nil current) data (- (point) old-pos)) + (setq gnus-newsgroup-threads (nconc threads gnus-newsgroup-threads)) + (when line + (gnus-data-compute-positions))))) (defun gnus-number-to-header (number) "Return the header for article NUMBER." @@ -4568,8 +4578,12 @@ This is meant to be called in `gnus-article-internal-prepare-hook'." (mail-header-set-xref headers xref))))))) (defun gnus-summary-insert-subject (id &optional old-header use-old-header) - "Find article ID and insert the summary line for that article." - (let ((header (cond ((and old-header use-old-header) + "Find article ID and insert the summary line for that article. +OLD-HEADER can either be a header or a line number to insert +the subject line on." + (let* ((line (and (numberp old-header) old-header)) + (old-header (and (vectorp old-header) old-header)) + (header (cond ((and old-header use-old-header) old-header) ((and (numberp id) (gnus-number-to-header id)) @@ -4599,7 +4613,7 @@ This is meant to be called in `gnus-article-internal-prepare-hook'." gnus-newsgroup-sparse)) (setq gnus-newsgroup-ancient (delq number gnus-newsgroup-ancient)) (push number gnus-newsgroup-limit) - (gnus-rebuild-thread (mail-header-id header)) + (gnus-rebuild-thread (mail-header-id header) line) (gnus-summary-goto-subject number nil t)) (when (and (numberp number) (> number 0)) @@ -5439,7 +5453,10 @@ If FORCE, also allow jumping to articles not currently shown." ;; We read in the article if we have to. (and (not data) force - (gnus-summary-insert-subject article (and (vectorp force) force) t) + (gnus-summary-insert-subject + article + (if (or (numberp force) (vectorp force)) force) + t) (setq data (gnus-data-find article))) (goto-char b) (if (not data) @@ -5549,7 +5566,7 @@ If BACKWARD, the previous article is selected instead of the next." (not unread) (not subject)) (gnus-summary-goto-article (if backward (1- gnus-newsgroup-begin) (1+ gnus-newsgroup-end)) - nil t)) + nil (count-lines (point-min) (point)))) ;; Go to next/previous group. (t (unless (gnus-ephemeral-group-p gnus-newsgroup-name) @@ -5825,7 +5842,9 @@ Return nil if there are no articles." (defun gnus-summary-goto-article (article &optional all-headers force) "Fetch ARTICLE (article number or Message-ID) and display it if it exists. -If ALL-HEADERS is non-nil, no header lines are hidden." +If ALL-HEADERS is non-nil, no header lines are hidden. +If FORCE, go to the article even if it isn't displayed. If FORCE +is a number, it is the line the article is to be displayed on." (interactive (list (completing-read @@ -5926,8 +5945,8 @@ articles that are younger than AGE days." (nnmail-time-since (nnmail-date-to-time date)) cutoff)) (when (if younger-p - (not is-younger) - is-younger) + is-younger + (not is-younger)) (push (gnus-data-number d) articles)))) (gnus-summary-limit (nreverse articles))) (gnus-summary-position-point))) @@ -7250,7 +7269,7 @@ delete these instead." gnus-newsgroup-name) (error "The current newsgroup does not support article deletion")) ;; Compute the list of articles to delete. - (let ((articles (gnus-summary-work-articles n)) + (let ((articles (sort (copy-sequence (gnus-summary-work-articles n)) '<)) not-deleted) (if (and gnus-novice-user (not (gnus-yes-or-no-p diff --git a/lisp/gnus.el b/lisp/gnus.el index 3f1cdc0..f9bf1e6 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -250,11 +250,11 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "6.7.1" +(defconst gnus-version-number "6.7.2" "Version number for this version of gnus.") (defconst gnus-version - (format "Chao-gnus %s (based on Gnus 5.6.13; for SEMI 1.8)" + (format "Semi-gnus %s (based on Gnus 5.6.15; for SEMI 1.8)" gnus-version-number) "Version string for this version of gnus.") @@ -2477,7 +2477,10 @@ If SCORE is nil, add 1 to the score of GROUP." "Collapse GROUP name LEVELS. Select methods are stripped and any remote host name is stripped down to just the host name." - (let* ((name "") (foreign "") (depth -1) (skip 1) + (let* ((name "") + (foreign "") + (depth 0) + (skip 1) (levels (or levels (progn (while (string-match "\\." group skip)