Mercurial > hg > xemacs-beta
comparison lisp/gnus/gnus-sum.el @ 38:1a767b41a199 r19-15b102
Import from CVS: tag r19-15b102
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:54:01 +0200 |
parents | c53a95d3c46d |
children | 8b8b7f3559a2 |
comparison
equal
deleted
inserted
replaced
37:ad40ac360d14 | 38:1a767b41a199 |
---|---|
286 "*If non-nil, don't hide any headers." | 286 "*If non-nil, don't hide any headers." |
287 :group 'gnus-article-hiding | 287 :group 'gnus-article-hiding |
288 :group 'gnus-article-headers | 288 :group 'gnus-article-headers |
289 :type 'boolean) | 289 :type 'boolean) |
290 | 290 |
291 (defcustom gnus-summary-ignore-duplicates nil | |
292 "*If non-nil, ignore articles with identical Message-ID headers." | |
293 :group 'gnus-summary | |
294 :type 'boolean) | |
295 | |
291 (defcustom gnus-single-article-buffer t | 296 (defcustom gnus-single-article-buffer t |
292 "*If non-nil, display all articles in the same buffer. | 297 "*If non-nil, display all articles in the same buffer. |
293 If nil, each group will get its own article buffer." | 298 If nil, each group will get its own article buffer." |
294 :group 'gnus-article-various | 299 :group 'gnus-article-various |
295 :type 'boolean) | 300 :type 'boolean) |
2463 If NO-ARTICLE is non-nil, no article is selected initially. | 2468 If NO-ARTICLE is non-nil, no article is selected initially. |
2464 If NO-DISPLAY, don't generate a summary buffer." | 2469 If NO-DISPLAY, don't generate a summary buffer." |
2465 (let (result) | 2470 (let (result) |
2466 (while (and group | 2471 (while (and group |
2467 (null (setq result | 2472 (null (setq result |
2468 (gnus-summary-read-group-1 | 2473 (let ((gnus-auto-select-next nil)) |
2469 group show-all no-article | 2474 (gnus-summary-read-group-1 |
2470 kill-buffer no-display))) | 2475 group show-all no-article |
2476 kill-buffer no-display)))) | |
2471 (eq gnus-auto-select-next 'quietly)) | 2477 (eq gnus-auto-select-next 'quietly)) |
2472 (set-buffer gnus-group-buffer) | 2478 (set-buffer gnus-group-buffer) |
2473 (if (not (equal group (gnus-group-group-name))) | 2479 (if (not (equal group (gnus-group-group-name))) |
2474 (setq group (gnus-group-group-name)) | 2480 (setq group (gnus-group-group-name)) |
2475 (setq group nil))) | 2481 (setq group nil))) |
2611 ;; the current buffer ain't the displayed window. | 2617 ;; the current buffer ain't the displayed window. |
2612 (let ((owin (selected-window))) | 2618 (let ((owin (selected-window))) |
2613 (select-window (get-buffer-window gnus-group-buffer t)) | 2619 (select-window (get-buffer-window gnus-group-buffer t)) |
2614 (when (gnus-group-goto-group group) | 2620 (when (gnus-group-goto-group group) |
2615 (recenter)) | 2621 (recenter)) |
2616 (select-window owin)))) | 2622 (select-window owin))) |
2617 ;; Mark this buffer as "prepared". | 2623 ;; Mark this buffer as "prepared". |
2618 (setq gnus-newsgroup-prepared t) | 2624 (setq gnus-newsgroup-prepared t) |
2619 t)))) | 2625 t))))) |
2620 | 2626 |
2621 (defun gnus-summary-prepare () | 2627 (defun gnus-summary-prepare () |
2622 "Generate the summary buffer." | 2628 "Generate the summary buffer." |
2623 (interactive) | 2629 (interactive) |
2624 (let ((buffer-read-only nil)) | 2630 (let ((buffer-read-only nil)) |
2884 (let ((deps gnus-newsgroup-dependencies) | 2890 (let ((deps gnus-newsgroup-dependencies) |
2885 found header) | 2891 found header) |
2886 (prog1 | 2892 (prog1 |
2887 (save-excursion | 2893 (save-excursion |
2888 (set-buffer nntp-server-buffer) | 2894 (set-buffer nntp-server-buffer) |
2889 (goto-char (point-min)) | 2895 (let ((case-fold-search nil)) |
2890 (while (and (not found) (search-forward id nil t)) | 2896 (goto-char (point-min)) |
2891 (beginning-of-line) | 2897 (while (and (not found) |
2892 (setq found (looking-at | 2898 (search-forward id nil t)) |
2893 (format "^[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t%s" | 2899 (beginning-of-line) |
2894 (regexp-quote id)))) | 2900 (setq found (looking-at |
2895 (or found (beginning-of-line 2))) | 2901 (format "^[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t%s" |
2896 (when found | 2902 (regexp-quote id)))) |
2897 (beginning-of-line) | 2903 (or found (beginning-of-line 2))) |
2898 (and | 2904 (when found |
2899 (setq header (gnus-nov-parse-line | 2905 (beginning-of-line) |
2900 (read (current-buffer)) deps)) | 2906 (and |
2901 (gnus-parent-id (mail-header-references header))))) | 2907 (setq header (gnus-nov-parse-line |
2908 (read (current-buffer)) deps)) | |
2909 (gnus-parent-id (mail-header-references header)))))) | |
2902 (when header | 2910 (when header |
2903 (let ((number (mail-header-number header))) | 2911 (let ((number (mail-header-number header))) |
2904 (push number gnus-newsgroup-limit) | 2912 (push number gnus-newsgroup-limit) |
2905 (push header gnus-newsgroup-headers) | 2913 (push header gnus-newsgroup-headers) |
2906 (if (memq number gnus-newsgroup-unselected) | 2914 (if (memq number gnus-newsgroup-unselected) |
4194 ;; done in case an article has arrived before the article | 4202 ;; done in case an article has arrived before the article |
4195 ;; which it refers to. | 4203 ;; which it refers to. |
4196 (if (boundp (setq id-dep (intern id dependencies))) | 4204 (if (boundp (setq id-dep (intern id dependencies))) |
4197 (if (and (car (symbol-value id-dep)) | 4205 (if (and (car (symbol-value id-dep)) |
4198 (not force-new)) | 4206 (not force-new)) |
4199 ;; An article with this Message-ID has already been seen, | 4207 ;; An article with this Message-ID has already been seen. |
4200 ;; so we rename the Message-ID. | 4208 (if gnus-summary-ignore-duplicates |
4201 (progn | 4209 ;; We ignore this one, except we add |
4210 ;; any additional Xrefs (in case the two articles | |
4211 ;; came from different servers). | |
4212 (progn | |
4213 (mail-header-set-xref | |
4214 (car (symbol-value id-dep)) | |
4215 (concat (or (mail-header-xref | |
4216 (car (symbol-value id-dep))) | |
4217 "") | |
4218 (or (mail-header-xref header) ""))) | |
4219 (setq header nil)) | |
4220 ;; We rename the Message-ID. | |
4202 (set | 4221 (set |
4203 (setq id-dep (intern (setq id (nnmail-message-id)) | 4222 (setq id-dep (intern (setq id (nnmail-message-id)) |
4204 dependencies)) | 4223 dependencies)) |
4205 (list header)) | 4224 (list header)) |
4206 (mail-header-set-id header id)) | 4225 (mail-header-set-id header id)) |
4283 ;; This article refers back to itself. Naughty, naughty. | 4302 ;; This article refers back to itself. Naughty, naughty. |
4284 (setq ref nil)) | 4303 (setq ref nil)) |
4285 (if (boundp (setq id-dep (intern id dependencies))) | 4304 (if (boundp (setq id-dep (intern id dependencies))) |
4286 (if (and (car (symbol-value id-dep)) | 4305 (if (and (car (symbol-value id-dep)) |
4287 (not force-new)) | 4306 (not force-new)) |
4288 ;; An article with this Message-ID has already been seen, | 4307 ;; An article with this Message-ID has already been seen. |
4289 ;; so we rename the Message-ID. | 4308 (if gnus-summary-ignore-duplicates |
4290 (progn | 4309 ;; We ignore this one, except we add any additional |
4310 ;; Xrefs (in case the two articles came from different | |
4311 ;; servers. | |
4312 (progn | |
4313 (mail-header-set-xref | |
4314 (car (symbol-value id-dep)) | |
4315 (concat (or (mail-header-xref | |
4316 (car (symbol-value id-dep))) | |
4317 "") | |
4318 (or (mail-header-xref header) ""))) | |
4319 (setq header nil)) | |
4320 ;; We rename the Message-ID. | |
4291 (set | 4321 (set |
4292 (setq id-dep (intern (setq id (nnmail-message-id)) | 4322 (setq id-dep (intern (setq id (nnmail-message-id)) |
4293 dependencies)) | 4323 dependencies)) |
4294 (list header)) | 4324 (list header)) |
4295 (mail-header-set-id header id)) | 4325 (mail-header-set-id header id)) |