diff options
| author | Lars Magne Ingebrigtsen | 1997-09-24 01:50:24 +0000 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 1997-09-24 01:50:24 +0000 |
| commit | a8151ef7e5caf46b41fc52f8189b07d1fa6c184e (patch) | |
| tree | 8eb82a1990da4afe2e247c1397e42a20128f0568 | |
| parent | 5f016f400343a57d641642ce114f90d3a15082e1 (diff) | |
| download | emacs-a8151ef7e5caf46b41fc52f8189b07d1fa6c184e.tar.gz emacs-a8151ef7e5caf46b41fc52f8189b07d1fa6c184e.zip | |
*** empty log message ***
38 files changed, 1052 insertions, 716 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 5430fd7afb5..ab9ae675cfa 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -191,7 +191,7 @@ asynchronously. The compressed face will be piped to this command." | |||
| 191 | (lambda (spec) | 191 | (lambda (spec) |
| 192 | (list | 192 | (list |
| 193 | (format format (car spec) (cadr spec)) | 193 | (format format (car spec) (cadr spec)) |
| 194 | 2 3 (intern (format "gnus-emphasis-%s" (car (cddr spec)))))) | 194 | 2 3 (intern (format "gnus-emphasis-%s" (caddr spec))))) |
| 195 | types))) | 195 | types))) |
| 196 | "Alist that says how to fontify certain phrases. | 196 | "Alist that says how to fontify certain phrases. |
| 197 | Each item looks like this: | 197 | Each item looks like this: |
| @@ -397,6 +397,11 @@ If you want to run a special decoding program like nkf, use this hook." | |||
| 397 | :type 'hook | 397 | :type 'hook |
| 398 | :group 'gnus-article-various) | 398 | :group 'gnus-article-various) |
| 399 | 399 | ||
| 400 | (defcustom gnus-article-hide-pgp-hook nil | ||
| 401 | "*A hook called after successfully hiding a PGP signature." | ||
| 402 | :type 'hook | ||
| 403 | :group 'gnus-article-various) | ||
| 404 | |||
| 400 | (defcustom gnus-article-button-face 'bold | 405 | (defcustom gnus-article-button-face 'bold |
| 401 | "Face used for highlighting buttons in the article buffer. | 406 | "Face used for highlighting buttons in the article buffer. |
| 402 | 407 | ||
| @@ -413,12 +418,20 @@ above them." | |||
| 413 | :type 'face | 418 | :type 'face |
| 414 | :group 'gnus-article-buttons) | 419 | :group 'gnus-article-buttons) |
| 415 | 420 | ||
| 416 | (defcustom gnus-signature-face 'italic | 421 | (defcustom gnus-signature-face 'gnus-signature-face |
| 417 | "Face used for highlighting a signature in the article buffer." | 422 | "Face used for highlighting a signature in the article buffer. |
| 423 | Obsolete; use the face `gnus-signature-face' for customizations instead." | ||
| 418 | :type 'face | 424 | :type 'face |
| 419 | :group 'gnus-article-highlight | 425 | :group 'gnus-article-highlight |
| 420 | :group 'gnus-article-signature) | 426 | :group 'gnus-article-signature) |
| 421 | 427 | ||
| 428 | (defface gnus-signature-face | ||
| 429 | '((((type x)) | ||
| 430 | (:italic t))) | ||
| 431 | "Face used for highlighting a signature in the article buffer." | ||
| 432 | :group 'gnus-article-highlight | ||
| 433 | :group 'gnus-article-signature) | ||
| 434 | |||
| 422 | (defface gnus-header-from-face | 435 | (defface gnus-header-from-face |
| 423 | '((((class color) | 436 | '((((class color) |
| 424 | (background dark)) | 437 | (background dark)) |
| @@ -569,20 +582,20 @@ Initialized from `text-mode-syntax-table.") | |||
| 569 | (defun gnus-article-delete-text-of-type (type) | 582 | (defun gnus-article-delete-text-of-type (type) |
| 570 | "Delete text of TYPE in the current buffer." | 583 | "Delete text of TYPE in the current buffer." |
| 571 | (save-excursion | 584 | (save-excursion |
| 572 | (let ((e (point-min)) | 585 | (let ((b (point-min))) |
| 573 | b) | 586 | (while (setq b (text-property-any b (point-max) 'article-type type)) |
| 574 | (while (setq b (text-property-any e (point-max) 'article-type type)) | 587 | (delete-region |
| 575 | (setq e (text-property-not-all b (point-max) 'article-type type)) | 588 | b (or (text-property-not-all b (point-max) 'article-type type) |
| 576 | (delete-region b e))))) | 589 | (point-max))))))) |
| 577 | 590 | ||
| 578 | (defun gnus-article-delete-invisible-text () | 591 | (defun gnus-article-delete-invisible-text () |
| 579 | "Delete all invisible text in the current buffer." | 592 | "Delete all invisible text in the current buffer." |
| 580 | (save-excursion | 593 | (save-excursion |
| 581 | (let ((e (point-min)) | 594 | (let ((b (point-min))) |
| 582 | b) | 595 | (while (setq b (text-property-any b (point-max) 'invisible t)) |
| 583 | (while (setq b (text-property-any e (point-max) 'invisible t)) | 596 | (delete-region |
| 584 | (setq e (text-property-not-all b (point-max) 'invisible t)) | 597 | b (or (text-property-not-all b (point-max) 'invisible t) |
| 585 | (delete-region b e))))) | 598 | (point-max))))))) |
| 586 | 599 | ||
| 587 | (defun gnus-article-text-type-exists-p (type) | 600 | (defun gnus-article-text-type-exists-p (type) |
| 588 | "Say whether any text of type TYPE exists in the buffer." | 601 | "Say whether any text of type TYPE exists in the buffer." |
| @@ -828,33 +841,46 @@ always hide." | |||
| 828 | (nnheader-narrow-to-headers) | 841 | (nnheader-narrow-to-headers) |
| 829 | (setq from (message-fetch-field "from")) | 842 | (setq from (message-fetch-field "from")) |
| 830 | (goto-char (point-min)) | 843 | (goto-char (point-min)) |
| 831 | (when (and gnus-article-x-face-command | 844 | (while (and gnus-article-x-face-command |
| 832 | (or force | 845 | (or force |
| 833 | ;; Check whether this face is censored. | 846 | ;; Check whether this face is censored. |
| 834 | (not gnus-article-x-face-too-ugly) | 847 | (not gnus-article-x-face-too-ugly) |
| 835 | (and gnus-article-x-face-too-ugly from | 848 | (and gnus-article-x-face-too-ugly from |
| 836 | (not (string-match gnus-article-x-face-too-ugly | 849 | (not (string-match gnus-article-x-face-too-ugly |
| 837 | from)))) | 850 | from)))) |
| 838 | ;; Has to be present. | 851 | ;; Has to be present. |
| 839 | (re-search-forward "^X-Face: " nil t)) | 852 | (re-search-forward "^X-Face: " nil t)) |
| 840 | ;; We now have the area of the buffer where the X-Face is stored. | 853 | ;; We now have the area of the buffer where the X-Face is stored. |
| 841 | (let ((beg (point)) | 854 | (save-excursion |
| 842 | (end (1- (re-search-forward "^\\($\\|[^ \t]\\)" nil t)))) | 855 | (let ((beg (point)) |
| 843 | ;; We display the face. | 856 | (end (1- (re-search-forward "^\\($\\|[^ \t]\\)" nil t)))) |
| 844 | (if (symbolp gnus-article-x-face-command) | 857 | ;; We display the face. |
| 845 | ;; The command is a lisp function, so we call it. | 858 | (if (symbolp gnus-article-x-face-command) |
| 846 | (if (gnus-functionp gnus-article-x-face-command) | 859 | ;; The command is a lisp function, so we call it. |
| 847 | (funcall gnus-article-x-face-command beg end) | 860 | (if (gnus-functionp gnus-article-x-face-command) |
| 848 | (error "%s is not a function" gnus-article-x-face-command)) | 861 | (funcall gnus-article-x-face-command beg end) |
| 849 | ;; The command is a string, so we interpret the command | 862 | (error "%s is not a function" gnus-article-x-face-command)) |
| 850 | ;; as a, well, command, and fork it off. | 863 | ;; The command is a string, so we interpret the command |
| 851 | (let ((process-connection-type nil)) | 864 | ;; as a, well, command, and fork it off. |
| 852 | (process-kill-without-query | 865 | (let ((process-connection-type nil)) |
| 853 | (start-process | 866 | (process-kill-without-query |
| 854 | "article-x-face" nil shell-file-name shell-command-switch | 867 | (start-process |
| 855 | gnus-article-x-face-command)) | 868 | "article-x-face" nil shell-file-name shell-command-switch |
| 856 | (process-send-region "article-x-face" beg end) | 869 | gnus-article-x-face-command)) |
| 857 | (process-send-eof "article-x-face"))))))))) | 870 | (process-send-region "article-x-face" beg end) |
| 871 | (process-send-eof "article-x-face")))))))))) | ||
| 872 | |||
| 873 | (defun gnus-hack-decode-rfc1522 () | ||
| 874 | "Emergency hack function for avoiding problems when decoding." | ||
| 875 | (let ((buffer-read-only nil)) | ||
| 876 | (goto-char (point-min)) | ||
| 877 | ;; Remove encoded TABs. | ||
| 878 | (while (search-forward "=09" nil t) | ||
| 879 | (replace-match " " t t)) | ||
| 880 | ;; Remove encoded newlines. | ||
| 881 | (goto-char (point-min)) | ||
| 882 | (while (search-forward "=10" nil t) | ||
| 883 | (replace-match " " t t)))) | ||
| 858 | 884 | ||
| 859 | (defalias 'gnus-decode-rfc1522 'article-decode-rfc1522) | 885 | (defalias 'gnus-decode-rfc1522 'article-decode-rfc1522) |
| 860 | (defalias 'gnus-article-decode-rfc1522 'article-decode-rfc1522) | 886 | (defalias 'gnus-article-decode-rfc1522 'article-decode-rfc1522) |
| @@ -937,27 +963,28 @@ always hide." | |||
| 937 | ;; Hide the "header". | 963 | ;; Hide the "header". |
| 938 | (when (search-forward "\n-----BEGIN PGP SIGNED MESSAGE-----\n" nil t) | 964 | (when (search-forward "\n-----BEGIN PGP SIGNED MESSAGE-----\n" nil t) |
| 939 | (gnus-article-hide-text-type (1+ (match-beginning 0)) | 965 | (gnus-article-hide-text-type (1+ (match-beginning 0)) |
| 940 | (match-end 0) 'pgp)) | 966 | (match-end 0) 'pgp) |
| 941 | (setq beg (point)) | 967 | (setq beg (point)) |
| 942 | ;; Hide the actual signature. | 968 | ;; Hide the actual signature. |
| 943 | (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t) | 969 | (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t) |
| 944 | (setq end (1+ (match-beginning 0))) | 970 | (setq end (1+ (match-beginning 0))) |
| 945 | (gnus-article-hide-text-type | 971 | (gnus-article-hide-text-type |
| 946 | end | 972 | end |
| 947 | (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t) | 973 | (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t) |
| 948 | (match-end 0) | 974 | (match-end 0) |
| 949 | ;; Perhaps we shouldn't hide to the end of the buffer | 975 | ;; Perhaps we shouldn't hide to the end of the buffer |
| 950 | ;; if there is no end to the signature? | 976 | ;; if there is no end to the signature? |
| 951 | (point-max)) | 977 | (point-max)) |
| 952 | 'pgp)) | 978 | 'pgp)) |
| 953 | ;; Hide "- " PGP quotation markers. | 979 | ;; Hide "- " PGP quotation markers. |
| 954 | (when (and beg end) | 980 | (when (and beg end) |
| 955 | (narrow-to-region beg end) | 981 | (narrow-to-region beg end) |
| 956 | (goto-char (point-min)) | 982 | (goto-char (point-min)) |
| 957 | (while (re-search-forward "^- " nil t) | 983 | (while (re-search-forward "^- " nil t) |
| 958 | (gnus-article-hide-text-type | 984 | (gnus-article-hide-text-type |
| 959 | (match-beginning 0) (match-end 0) 'pgp)) | 985 | (match-beginning 0) (match-end 0) 'pgp)) |
| 960 | (widen)))))) | 986 | (widen)) |
| 987 | (run-hooks 'gnus-article-hide-pgp-hook)))))) | ||
| 961 | 988 | ||
| 962 | (defun article-hide-pem (&optional arg) | 989 | (defun article-hide-pem (&optional arg) |
| 963 | "Toggle hiding of any PEM headers and signatures in the current article. | 990 | "Toggle hiding of any PEM headers and signatures in the current article. |
| @@ -1101,7 +1128,8 @@ Put point at the beginning of the signature separator." | |||
| 1101 | nil))) | 1128 | nil))) |
| 1102 | 1129 | ||
| 1103 | (eval-and-compile | 1130 | (eval-and-compile |
| 1104 | (autoload 'w3-parse-buffer "w3-parse")) | 1131 | (autoload 'w3-display "w3-parse") |
| 1132 | (autoload 'w3-do-setup "w3" "" t)) | ||
| 1105 | 1133 | ||
| 1106 | (defun gnus-article-treat-html () | 1134 | (defun gnus-article-treat-html () |
| 1107 | "Render HTML." | 1135 | "Render HTML." |
| @@ -1109,6 +1137,7 @@ Put point at the beginning of the signature separator." | |||
| 1109 | (let ((cbuf (current-buffer))) | 1137 | (let ((cbuf (current-buffer))) |
| 1110 | (set-buffer gnus-article-buffer) | 1138 | (set-buffer gnus-article-buffer) |
| 1111 | (let (buf buffer-read-only b e) | 1139 | (let (buf buffer-read-only b e) |
| 1140 | (w3-do-setup) | ||
| 1112 | (goto-char (point-min)) | 1141 | (goto-char (point-min)) |
| 1113 | (narrow-to-region | 1142 | (narrow-to-region |
| 1114 | (if (search-forward "\n\n" nil t) | 1143 | (if (search-forward "\n\n" nil t) |
| @@ -1117,12 +1146,13 @@ Put point at the beginning of the signature separator." | |||
| 1117 | (setq e (point-max))) | 1146 | (setq e (point-max))) |
| 1118 | (nnheader-temp-write nil | 1147 | (nnheader-temp-write nil |
| 1119 | (insert-buffer-substring gnus-article-buffer b e) | 1148 | (insert-buffer-substring gnus-article-buffer b e) |
| 1149 | (require 'url) | ||
| 1120 | (save-window-excursion | 1150 | (save-window-excursion |
| 1121 | (setq buf (car (w3-parse-buffer (current-buffer)))))) | 1151 | (w3-region (point-min) (point-max)) |
| 1152 | (setq buf (buffer-substring-no-properties (point-min) (point-max))))) | ||
| 1122 | (when buf | 1153 | (when buf |
| 1123 | (delete-region (point-min) (point-max)) | 1154 | (delete-region (point-min) (point-max)) |
| 1124 | (insert-buffer-substring buf) | 1155 | (insert buf)) |
| 1125 | (kill-buffer buf)) | ||
| 1126 | (widen) | 1156 | (widen) |
| 1127 | (goto-char (point-min)) | 1157 | (goto-char (point-min)) |
| 1128 | (set-window-start (get-buffer-window (current-buffer)) (point-min)) | 1158 | (set-window-start (get-buffer-window (current-buffer)) (point-min)) |
| @@ -1391,7 +1421,7 @@ This format is defined by the `gnus-article-time-format' variable." | |||
| 1391 | (gnus-article-hide-headers 1 t))) | 1421 | (gnus-article-hide-headers 1 t))) |
| 1392 | (save-window-excursion | 1422 | (save-window-excursion |
| 1393 | (if (not gnus-default-article-saver) | 1423 | (if (not gnus-default-article-saver) |
| 1394 | (error "No default saver is defined.") | 1424 | (error "No default saver is defined") |
| 1395 | ;; !!! Magic! The saving functions all save | 1425 | ;; !!! Magic! The saving functions all save |
| 1396 | ;; `gnus-original-article-buffer' (or so they think), but we | 1426 | ;; `gnus-original-article-buffer' (or so they think), but we |
| 1397 | ;; bind that variable to our save-buffer. | 1427 | ;; bind that variable to our save-buffer. |
| @@ -1452,7 +1482,8 @@ This format is defined by the `gnus-article-time-format' variable." | |||
| 1452 | default-name)) | 1482 | default-name)) |
| 1453 | ;; A single split name was found | 1483 | ;; A single split name was found |
| 1454 | ((= 1 (length split-name)) | 1484 | ((= 1 (length split-name)) |
| 1455 | (let* ((name (car split-name)) | 1485 | (let* ((name (expand-file-name |
| 1486 | (car split-name) gnus-article-save-directory)) | ||
| 1456 | (dir (cond ((file-directory-p name) | 1487 | (dir (cond ((file-directory-p name) |
| 1457 | (file-name-as-directory name)) | 1488 | (file-name-as-directory name)) |
| 1458 | ((file-exists-p name) name) | 1489 | ((file-exists-p name) name) |
| @@ -1718,34 +1749,33 @@ If variable `gnus-use-long-file-name' is non-nil, it is | |||
| 1718 | 1749 | ||
| 1719 | (put 'gnus-article-mode 'mode-class 'special) | 1750 | (put 'gnus-article-mode 'mode-class 'special) |
| 1720 | 1751 | ||
| 1721 | (when t | 1752 | (gnus-define-keys gnus-article-mode-map |
| 1722 | (gnus-define-keys gnus-article-mode-map | 1753 | " " gnus-article-goto-next-page |
| 1723 | " " gnus-article-goto-next-page | 1754 | "\177" gnus-article-goto-prev-page |
| 1724 | "\177" gnus-article-goto-prev-page | 1755 | [delete] gnus-article-goto-prev-page |
| 1725 | [delete] gnus-article-goto-prev-page | 1756 | "\C-c^" gnus-article-refer-article |
| 1726 | "\C-c^" gnus-article-refer-article | 1757 | "h" gnus-article-show-summary |
| 1727 | "h" gnus-article-show-summary | 1758 | "s" gnus-article-show-summary |
| 1728 | "s" gnus-article-show-summary | 1759 | "\C-c\C-m" gnus-article-mail |
| 1729 | "\C-c\C-m" gnus-article-mail | 1760 | "?" gnus-article-describe-briefly |
| 1730 | "?" gnus-article-describe-briefly | 1761 | gnus-mouse-2 gnus-article-push-button |
| 1731 | gnus-mouse-2 gnus-article-push-button | 1762 | "\r" gnus-article-press-button |
| 1732 | "\r" gnus-article-press-button | 1763 | "\t" gnus-article-next-button |
| 1733 | "\t" gnus-article-next-button | 1764 | "\M-\t" gnus-article-prev-button |
| 1734 | "\M-\t" gnus-article-prev-button | 1765 | "e" gnus-article-edit |
| 1735 | "e" gnus-article-edit | 1766 | "<" beginning-of-buffer |
| 1736 | "<" beginning-of-buffer | 1767 | ">" end-of-buffer |
| 1737 | ">" end-of-buffer | 1768 | "\C-c\C-i" gnus-info-find-node |
| 1738 | "\C-c\C-i" gnus-info-find-node | 1769 | "\C-c\C-b" gnus-bug |
| 1739 | "\C-c\C-b" gnus-bug | 1770 | |
| 1740 | 1771 | "\C-d" gnus-article-read-summary-keys | |
| 1741 | "\C-d" gnus-article-read-summary-keys | 1772 | "\M-*" gnus-article-read-summary-keys |
| 1742 | "\M-*" gnus-article-read-summary-keys | 1773 | "\M-#" gnus-article-read-summary-keys |
| 1743 | "\M-#" gnus-article-read-summary-keys | 1774 | "\M-^" gnus-article-read-summary-keys |
| 1744 | "\M-^" gnus-article-read-summary-keys | 1775 | "\M-g" gnus-article-read-summary-keys) |
| 1745 | "\M-g" gnus-article-read-summary-keys) | 1776 | |
| 1746 | 1777 | (substitute-key-definition | |
| 1747 | (substitute-key-definition | 1778 | 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map) |
| 1748 | 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map)) | ||
| 1749 | 1779 | ||
| 1750 | (defun gnus-article-make-menu-bar () | 1780 | (defun gnus-article-make-menu-bar () |
| 1751 | (gnus-turn-off-edit-menu 'article) | 1781 | (gnus-turn-off-edit-menu 'article) |
| @@ -2032,7 +2062,8 @@ Provided for backwards compatibility." | |||
| 2032 | ;; save it to file. | 2062 | ;; save it to file. |
| 2033 | (goto-char (point-max)) | 2063 | (goto-char (point-max)) |
| 2034 | (insert "\n") | 2064 | (insert "\n") |
| 2035 | (append-to-file (point-min) (point-max) file-name)))) | 2065 | (append-to-file (point-min) (point-max) file-name) |
| 2066 | t))) | ||
| 2036 | 2067 | ||
| 2037 | (defun gnus-narrow-to-page (&optional arg) | 2068 | (defun gnus-narrow-to-page (&optional arg) |
| 2038 | "Narrow the article buffer to a page. | 2069 | "Narrow the article buffer to a page. |
| @@ -2151,6 +2182,7 @@ Argument LINES specifies lines to be scrolled down." | |||
| 2151 | (interactive) | 2182 | (interactive) |
| 2152 | (if (not (gnus-buffer-live-p gnus-summary-buffer)) | 2183 | (if (not (gnus-buffer-live-p gnus-summary-buffer)) |
| 2153 | (error "There is no summary buffer for this article buffer") | 2184 | (error "There is no summary buffer for this article buffer") |
| 2185 | (gnus-article-set-globals) | ||
| 2154 | (gnus-configure-windows 'article) | 2186 | (gnus-configure-windows 'article) |
| 2155 | (gnus-summary-goto-subject gnus-current-article))) | 2187 | (gnus-summary-goto-subject gnus-current-article))) |
| 2156 | 2188 | ||
| @@ -2442,7 +2474,7 @@ groups." | |||
| 2442 | (interactive "P") | 2474 | (interactive "P") |
| 2443 | (when (and (not force) | 2475 | (when (and (not force) |
| 2444 | (gnus-group-read-only-p)) | 2476 | (gnus-group-read-only-p)) |
| 2445 | (error "The current newsgroup does not support article editing.")) | 2477 | (error "The current newsgroup does not support article editing")) |
| 2446 | (gnus-article-edit-article | 2478 | (gnus-article-edit-article |
| 2447 | `(lambda () | 2479 | `(lambda () |
| 2448 | (gnus-summary-edit-article-done | 2480 | (gnus-summary-edit-article-done |
| @@ -2454,7 +2486,7 @@ groups." | |||
| 2454 | (let ((winconf (current-window-configuration))) | 2486 | (let ((winconf (current-window-configuration))) |
| 2455 | (set-buffer gnus-article-buffer) | 2487 | (set-buffer gnus-article-buffer) |
| 2456 | (gnus-article-edit-mode) | 2488 | (gnus-article-edit-mode) |
| 2457 | (set-text-properties (point-min) (point-max) nil) | 2489 | (gnus-set-text-properties (point-min) (point-max) nil) |
| 2458 | (gnus-configure-windows 'edit-article) | 2490 | (gnus-configure-windows 'edit-article) |
| 2459 | (setq gnus-article-edit-done-function exit-func) | 2491 | (setq gnus-article-edit-done-function exit-func) |
| 2460 | (setq gnus-prev-winconf winconf) | 2492 | (setq gnus-prev-winconf winconf) |
| @@ -2532,14 +2564,14 @@ groups." | |||
| 2532 | (defcustom gnus-button-alist | 2564 | (defcustom gnus-button-alist |
| 2533 | `(("<\\(url: ?\\)?news:\\([^>\n\t ]*@[^>\n\t ]*\\)>" 0 t | 2565 | `(("<\\(url: ?\\)?news:\\([^>\n\t ]*@[^>\n\t ]*\\)>" 0 t |
| 2534 | gnus-button-message-id 2) | 2566 | gnus-button-message-id 2) |
| 2535 | ("\\bnews:\\([^>\n\t ]*@[^>\n\t ]*+\\)" 0 t gnus-button-message-id 1) | 2567 | ("\\bnews:\\([^>\n\t ]*@[^>\n\t ]*\\)" 0 t gnus-button-message-id 1) |
| 2536 | ("\\(\\b<\\(url: ?\\)?news:\\(//\\)?\\([^>\n\t ]*\\)>\\)" 1 t | 2568 | ("\\(\\b<\\(url: ?\\)?news:\\(//\\)?\\([^>\n\t ]*\\)>\\)" 1 t |
| 2537 | gnus-button-fetch-group 4) | 2569 | gnus-button-fetch-group 4) |
| 2538 | ("\\bnews:\\(//\\)?\\([^>\n\t ]+\\)" 0 t gnus-button-fetch-group 2) | 2570 | ("\\bnews:\\(//\\)?\\([^>\n\t ]+\\)" 0 t gnus-button-fetch-group 2) |
| 2539 | ("\\bin\\( +article\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2 | 2571 | ("\\bin\\( +article\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2 |
| 2540 | t gnus-button-message-id 3) | 2572 | t gnus-button-message-id 3) |
| 2541 | ("\\(<URL: *\\)mailto: *\\([^> \n\t]+\\)>" 0 t gnus-url-mailto 1) | 2573 | ("\\(<URL: *\\)mailto: *\\([^> \n\t]+\\)>" 0 t gnus-url-mailto 2) |
| 2542 | ("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 2) | 2574 | ("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 1) |
| 2543 | ;; This is how URLs _should_ be embedded in text... | 2575 | ;; This is how URLs _should_ be embedded in text... |
| 2544 | ("<URL: *\\([^>]*\\)>" 0 t gnus-button-embedded-url 1) | 2576 | ("<URL: *\\([^>]*\\)>" 0 t gnus-button-embedded-url 1) |
| 2545 | ;; Raw URLs. | 2577 | ;; Raw URLs. |
| @@ -2572,6 +2604,7 @@ variable it the real callback function." | |||
| 2572 | ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" | 2604 | ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" |
| 2573 | 0 t gnus-button-mailto 0) | 2605 | 0 t gnus-button-mailto 0) |
| 2574 | ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t gnus-button-url 0) | 2606 | ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t gnus-button-url 0) |
| 2607 | ("^Subject:" ,gnus-button-url-regexp 0 t gnus-button-url 0) | ||
| 2575 | ("^[^:]+:" ,gnus-button-url-regexp 0 t gnus-button-url 0) | 2608 | ("^[^:]+:" ,gnus-button-url-regexp 0 t gnus-button-url 0) |
| 2576 | ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t | 2609 | ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t |
| 2577 | gnus-button-message-id 3)) | 2610 | gnus-button-message-id 3)) |
| @@ -2846,6 +2879,11 @@ specified by `gnus-button-alist'." | |||
| 2846 | 2879 | ||
| 2847 | ;;; Internal functions: | 2880 | ;;; Internal functions: |
| 2848 | 2881 | ||
| 2882 | (defun gnus-article-set-globals () | ||
| 2883 | (save-excursion | ||
| 2884 | (set-buffer gnus-summary-buffer) | ||
| 2885 | (gnus-set-global-variables))) | ||
| 2886 | |||
| 2849 | (defun gnus-signature-toggle (end) | 2887 | (defun gnus-signature-toggle (end) |
| 2850 | (save-excursion | 2888 | (save-excursion |
| 2851 | (set-buffer gnus-article-buffer) | 2889 | (set-buffer gnus-article-buffer) |
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 3033ff41bd6..3a7cd8df8b5 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el | |||
| @@ -146,7 +146,8 @@ variable to \"^nnml\"." | |||
| 146 | (mail-header-set-number headers (cdr result)))) | 146 | (mail-header-set-number headers (cdr result)))) |
| 147 | (let ((number (mail-header-number headers)) | 147 | (let ((number (mail-header-number headers)) |
| 148 | file dir) | 148 | file dir) |
| 149 | (when (and (> number 0) ; Reffed article. | 149 | (when (and number |
| 150 | (> number 0) ; Reffed article. | ||
| 150 | (or force | 151 | (or force |
| 151 | (and (or (not gnus-uncacheable-groups) | 152 | (and (or (not gnus-uncacheable-groups) |
| 152 | (not (string-match | 153 | (not (string-match |
| @@ -256,15 +257,13 @@ variable to \"^nnml\"." | |||
| 256 | 257 | ||
| 257 | (defun gnus-cache-possibly-alter-active (group active) | 258 | (defun gnus-cache-possibly-alter-active (group active) |
| 258 | "Alter the ACTIVE info for GROUP to reflect the articles in the cache." | 259 | "Alter the ACTIVE info for GROUP to reflect the articles in the cache." |
| 259 | (when (equal group "no.norsk") (error "hie")) | ||
| 260 | (when gnus-cache-active-hashtb | 260 | (when gnus-cache-active-hashtb |
| 261 | (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) | 261 | (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) |
| 262 | (and cache-active | 262 | (when cache-active |
| 263 | (< (car cache-active) (car active)) | 263 | (when (< (car cache-active) (car active)) |
| 264 | (setcar active (car cache-active))) | 264 | (setcar active (car cache-active))) |
| 265 | (and cache-active | 265 | (when (> (cdr cache-active) (cdr active)) |
| 266 | (> (cdr cache-active) (cdr active)) | 266 | (setcdr active (cdr cache-active))))))) |
| 267 | (setcdr active (cdr cache-active)))))) | ||
| 268 | 267 | ||
| 269 | (defun gnus-cache-retrieve-headers (articles group &optional fetch-old) | 268 | (defun gnus-cache-retrieve-headers (articles group &optional fetch-old) |
| 270 | "Retrieve the headers for ARTICLES in GROUP." | 269 | "Retrieve the headers for ARTICLES in GROUP." |
| @@ -453,13 +452,20 @@ Returns the list of articles removed." | |||
| 453 | 452 | ||
| 454 | (defun gnus-cache-articles-in-group (group) | 453 | (defun gnus-cache-articles-in-group (group) |
| 455 | "Return a sorted list of cached articles in GROUP." | 454 | "Return a sorted list of cached articles in GROUP." |
| 456 | (let ((dir (file-name-directory (gnus-cache-file-name group 1)))) | 455 | (let ((dir (file-name-directory (gnus-cache-file-name group 1))) |
| 456 | articles) | ||
| 457 | (when (file-exists-p dir) | 457 | (when (file-exists-p dir) |
| 458 | (sort (mapcar (lambda (name) (string-to-int name)) | 458 | (setq articles |
| 459 | (directory-files dir nil "^[0-9]+$" t)) | 459 | (sort (mapcar (lambda (name) (string-to-int name)) |
| 460 | '<)))) | 460 | (directory-files dir nil "^[0-9]+$" t)) |
| 461 | 461 | '<)) | |
| 462 | (defun gnus-cache-braid-nov (group cached) | 462 | ;; Update the cache active file, just to synch more. |
| 463 | (when articles | ||
| 464 | (gnus-cache-update-active group (car articles) t) | ||
| 465 | (gnus-cache-update-active group (car (last articles)))) | ||
| 466 | articles))) | ||
| 467 | |||
| 468 | (defun gnus-cache-braid-nov (group cached &optional file) | ||
| 463 | (let ((cache-buf (get-buffer-create " *gnus-cache*")) | 469 | (let ((cache-buf (get-buffer-create " *gnus-cache*")) |
| 464 | beg end) | 470 | beg end) |
| 465 | (gnus-cache-save-buffers) | 471 | (gnus-cache-save-buffers) |
| @@ -467,7 +473,7 @@ Returns the list of articles removed." | |||
| 467 | (set-buffer cache-buf) | 473 | (set-buffer cache-buf) |
| 468 | (buffer-disable-undo (current-buffer)) | 474 | (buffer-disable-undo (current-buffer)) |
| 469 | (erase-buffer) | 475 | (erase-buffer) |
| 470 | (insert-file-contents (gnus-cache-file-name group ".overview")) | 476 | (insert-file-contents (or file (gnus-cache-file-name group ".overview"))) |
| 471 | (goto-char (point-min)) | 477 | (goto-char (point-min)) |
| 472 | (insert "\n") | 478 | (insert "\n") |
| 473 | (goto-char (point-min))) | 479 | (goto-char (point-min))) |
| @@ -540,22 +546,21 @@ $ emacs -batch -l ~/.emacs -l gnus -f gnus-jog-cache" | |||
| 540 | (gnus) | 546 | (gnus) |
| 541 | ;; Go through all groups... | 547 | ;; Go through all groups... |
| 542 | (gnus-group-mark-buffer) | 548 | (gnus-group-mark-buffer) |
| 543 | (gnus-group-universal-argument | 549 | (gnus-group-iterate nil |
| 544 | nil nil | 550 | (lambda (group) |
| 545 | (lambda () | 551 | (let (gnus-auto-select-next) |
| 546 | (interactive) | 552 | (gnus-summary-read-group group nil t) |
| 547 | (gnus-summary-read-group (gnus-group-group-name) nil t) | 553 | ;; ... and enter the articles into the cache. |
| 548 | ;; ... and enter the articles into the cache. | 554 | (when (eq major-mode 'gnus-summary-mode) |
| 549 | (when (eq major-mode 'gnus-summary-mode) | 555 | (gnus-uu-mark-buffer) |
| 550 | (gnus-uu-mark-buffer) | 556 | (gnus-cache-enter-article) |
| 551 | (gnus-cache-enter-article) | 557 | (kill-buffer (current-buffer)))))))) |
| 552 | (kill-buffer (current-buffer))))))) | ||
| 553 | 558 | ||
| 554 | (defun gnus-cache-read-active (&optional force) | 559 | (defun gnus-cache-read-active (&optional force) |
| 555 | "Read the cache active file." | 560 | "Read the cache active file." |
| 556 | (gnus-make-directory gnus-cache-directory) | 561 | (gnus-make-directory gnus-cache-directory) |
| 557 | (if (not (and (file-exists-p gnus-cache-active-file) | 562 | (if (or (not (file-exists-p gnus-cache-active-file)) |
| 558 | (or force (not gnus-cache-active-hashtb)))) | 563 | force) |
| 559 | ;; There is no active file, so we generate one. | 564 | ;; There is no active file, so we generate one. |
| 560 | (gnus-cache-generate-active) | 565 | (gnus-cache-generate-active) |
| 561 | ;; We simply read the active file. | 566 | ;; We simply read the active file. |
| @@ -651,7 +656,7 @@ If LOW, update the lower bound instead." | |||
| 651 | 656 | ||
| 652 | (defun gnus-cache-move-cache (dir) | 657 | (defun gnus-cache-move-cache (dir) |
| 653 | "Move the cache tree to somewhere else." | 658 | "Move the cache tree to somewhere else." |
| 654 | (interactive "DMove the cache tree to: ") | 659 | (interactive "FMove the cache tree to: ") |
| 655 | (rename-file gnus-cache-directory dir)) | 660 | (rename-file gnus-cache-directory dir)) |
| 656 | 661 | ||
| 657 | (provide 'gnus-cache) | 662 | (provide 'gnus-cache) |
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 95815ec5af3..09d688c0416 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el | |||
| @@ -100,13 +100,14 @@ The first regexp group should match the Supercite attribution." | |||
| 100 | :group 'gnus-cite | 100 | :group 'gnus-cite |
| 101 | :type 'integer) | 101 | :type 'integer) |
| 102 | 102 | ||
| 103 | (defcustom gnus-cite-attribution-prefix "in article\\|in <" | 103 | (defcustom gnus-cite-attribution-prefix |
| 104 | "in article\\|in <\\|On \\(Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\)," | ||
| 104 | "Regexp matching the beginning of an attribution line." | 105 | "Regexp matching the beginning of an attribution line." |
| 105 | :group 'gnus-cite | 106 | :group 'gnus-cite |
| 106 | :type 'regexp) | 107 | :type 'regexp) |
| 107 | 108 | ||
| 108 | (defcustom gnus-cite-attribution-suffix | 109 | (defcustom gnus-cite-attribution-suffix |
| 109 | "\\(wrote\\|writes\\|said\\|says\\):[ \t]*$" | 110 | "\\(\\(wrote\\|writes\\|said\\|says\\|>\\)\\(:\\|\\.\\.\\.\\)\\)[ ]*$" |
| 110 | "Regexp matching the end of an attribution line. | 111 | "Regexp matching the end of an attribution line. |
| 111 | The text matching the first grouping will be used as a button." | 112 | The text matching the first grouping will be used as a button." |
| 112 | :group 'gnus-cite | 113 | :group 'gnus-cite |
| @@ -439,7 +440,8 @@ If WIDTH (the numerical prefix), use that text width when filling." | |||
| 439 | (setq gnus-cite-prefix-alist nil | 440 | (setq gnus-cite-prefix-alist nil |
| 440 | gnus-cite-attribution-alist nil | 441 | gnus-cite-attribution-alist nil |
| 441 | gnus-cite-loose-prefix-alist nil | 442 | gnus-cite-loose-prefix-alist nil |
| 442 | gnus-cite-loose-attribution-alist nil))))) | 443 | gnus-cite-loose-attribution-alist nil |
| 444 | gnus-cite-article nil))))) | ||
| 443 | 445 | ||
| 444 | (defun gnus-article-hide-citation (&optional arg force) | 446 | (defun gnus-article-hide-citation (&optional arg force) |
| 445 | "Toggle hiding of all cited text except attribution lines. | 447 | "Toggle hiding of all cited text except attribution lines. |
diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index c997b9107a4..0900784af84 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el | |||
| @@ -152,21 +152,35 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's." | |||
| 152 | "Find out how many seconds to TIME, which is on the form \"17:43\"." | 152 | "Find out how many seconds to TIME, which is on the form \"17:43\"." |
| 153 | (if (not (stringp time)) | 153 | (if (not (stringp time)) |
| 154 | time | 154 | time |
| 155 | (let* ((date (current-time-string)) | 155 | (let* ((now (current-time)) |
| 156 | (dv (timezone-parse-date date)) | 156 | ;; obtain NOW as discrete components -- make a vector for speed |
| 157 | (tdate (timezone-make-arpa-date | 157 | (nowParts (apply 'vector (decode-time now))) |
| 158 | (string-to-number (aref dv 0)) | 158 | ;; obtain THEN as discrete components |
| 159 | (string-to-number (aref dv 1)) | 159 | (thenParts (timezone-parse-time time)) |
| 160 | (string-to-number (aref dv 2)) time | 160 | (thenHour (string-to-int (elt thenParts 0))) |
| 161 | (or (aref dv 4) "UT"))) | 161 | (thenMin (string-to-int (elt thenParts 1))) |
| 162 | (nseconds (gnus-time-minus | 162 | ;; convert time as elements into number of seconds since EPOCH. |
| 163 | (gnus-encode-date tdate) (gnus-encode-date date)))) | 163 | (then (encode-time 0 |
| 164 | (round | 164 | thenMin |
| 165 | (/ (+ (if (< (car nseconds) 0) | 165 | thenHour |
| 166 | 86400 0) | 166 | ;; If THEN is earlier than NOW, make it |
| 167 | (* 65536 (car nseconds)) | 167 | ;; same time tomorrow. Doc for encode-time |
| 168 | (nth 1 nseconds)) | 168 | ;; says that this is OK. |
| 169 | gnus-demon-timestep))))) | 169 | (+ (elt nowParts 3) |
| 170 | (if (or (< thenHour (elt nowParts 2)) | ||
| 171 | (and (= thenHour (elt nowParts 2)) | ||
| 172 | (<= thenMin (elt nowParts 1)))) | ||
| 173 | 1 0)) | ||
| 174 | (elt nowParts 4) | ||
| 175 | (elt nowParts 5) | ||
| 176 | (elt nowParts 6) | ||
| 177 | (elt nowParts 7) | ||
| 178 | (elt nowParts 8))) | ||
| 179 | ;; calculate number of seconds between NOW and THEN | ||
| 180 | (diff (+ (* 65536 (- (car then) (car now))) | ||
| 181 | (- (cadr then) (cadr now))))) | ||
| 182 | ;; return number of timesteps in the number of seconds | ||
| 183 | (round (/ diff gnus-demon-timestep))))) | ||
| 170 | 184 | ||
| 171 | (defun gnus-demon () | 185 | (defun gnus-demon () |
| 172 | "The Gnus daemon that takes care of running all Gnus handlers." | 186 | "The Gnus daemon that takes care of running all Gnus handlers." |
| @@ -202,7 +216,7 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's." | |||
| 202 | (t (< 0 gnus-demon-idle-time)))) ; Or just need to be idle. | 216 | (t (< 0 gnus-demon-idle-time)))) ; Or just need to be idle. |
| 203 | ;; So we call the handler. | 217 | ;; So we call the handler. |
| 204 | (progn | 218 | (progn |
| 205 | (funcall (car handler)) | 219 | (ignore-errors (funcall (car handler))) |
| 206 | ;; And reset the timer. | 220 | ;; And reset the timer. |
| 207 | (setcar (nthcdr 1 handler) | 221 | (setcar (nthcdr 1 handler) |
| 208 | (gnus-demon-time-to-step | 222 | (gnus-demon-time-to-step |
| @@ -211,24 +225,26 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's." | |||
| 211 | ((null (setq idle (nth 2 handler))) | 225 | ((null (setq idle (nth 2 handler))) |
| 212 | ;; We do nothing. | 226 | ;; We do nothing. |
| 213 | ) | 227 | ) |
| 214 | ((not (numberp idle)) | 228 | ((and (not (numberp idle)) |
| 229 | (gnus-demon-is-idle-p)) | ||
| 215 | ;; We want to call this handler each and every time that | 230 | ;; We want to call this handler each and every time that |
| 216 | ;; Emacs is idle. | 231 | ;; Emacs is idle. |
| 217 | (funcall (car handler))) | 232 | (ignore-errors (funcall (car handler)))) |
| 218 | (t | 233 | (t |
| 219 | ;; We want to call this handler only if Emacs has been idle | 234 | ;; We want to call this handler only if Emacs has been idle |
| 220 | ;; for a specified number of timesteps. | 235 | ;; for a specified number of timesteps. |
| 221 | (and (not (memq (car handler) gnus-demon-idle-has-been-called)) | 236 | (and (not (memq (car handler) gnus-demon-idle-has-been-called)) |
| 222 | (< idle gnus-demon-idle-time) | 237 | (< idle gnus-demon-idle-time) |
| 238 | (gnus-demon-is-idle-p) | ||
| 223 | (progn | 239 | (progn |
| 224 | (funcall (car handler)) | 240 | (ignore-errors (funcall (car handler))) |
| 225 | ;; Make sure the handler won't be called once more in | 241 | ;; Make sure the handler won't be called once more in |
| 226 | ;; this idle-cycle. | 242 | ;; this idle-cycle. |
| 227 | (push (car handler) gnus-demon-idle-has-been-called))))))))) | 243 | (push (car handler) gnus-demon-idle-has-been-called))))))))) |
| 228 | 244 | ||
| 229 | (defun gnus-demon-add-nocem () | 245 | (defun gnus-demon-add-nocem () |
| 230 | "Add daemonic NoCeM handling to Gnus." | 246 | "Add daemonic NoCeM handling to Gnus." |
| 231 | (gnus-demon-add-handler 'gnus-demon-scan-nocem 60 t)) | 247 | (gnus-demon-add-handler 'gnus-demon-scan-nocem 60 30)) |
| 232 | 248 | ||
| 233 | (defun gnus-demon-scan-nocem () | 249 | (defun gnus-demon-scan-nocem () |
| 234 | "Scan NoCeM groups for NoCeM messages." | 250 | "Scan NoCeM groups for NoCeM messages." |
diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el index 4c6595a4eb5..d4e5f762192 100644 --- a/lisp/gnus/gnus-ems.el +++ b/lisp/gnus/gnus-ems.el | |||
| @@ -34,11 +34,16 @@ | |||
| 34 | 34 | ||
| 35 | (defvar gnus-mouse-2 [mouse-2]) | 35 | (defvar gnus-mouse-2 [mouse-2]) |
| 36 | (defvar gnus-down-mouse-2 [down-mouse-2]) | 36 | (defvar gnus-down-mouse-2 [down-mouse-2]) |
| 37 | (defvar gnus-mode-line-modified | ||
| 38 | (if (or gnus-xemacs | ||
| 39 | (< emacs-major-version 20)) | ||
| 40 | '("--**-" . "-----") | ||
| 41 | '("**" "--"))) | ||
| 37 | 42 | ||
| 38 | (eval-and-compile | 43 | (eval-and-compile |
| 39 | (autoload 'gnus-xmas-define "gnus-xmas") | 44 | (autoload 'gnus-xmas-define "gnus-xmas") |
| 40 | (autoload 'gnus-xmas-redefine "gnus-xmas") | 45 | (autoload 'gnus-xmas-redefine "gnus-xmas") |
| 41 | (autoload 'appt-select-lowest-window "appt.el")) | 46 | (autoload 'appt-select-lowest-window "appt")) |
| 42 | 47 | ||
| 43 | (or (fboundp 'mail-file-babyl-p) | 48 | (or (fboundp 'mail-file-babyl-p) |
| 44 | (fset 'mail-file-babyl-p 'rmail-file-p)) | 49 | (fset 'mail-file-babyl-p 'rmail-file-p)) |
| @@ -70,18 +75,15 @@ | |||
| 70 | (truncate-string valstr (, max-width)) | 75 | (truncate-string valstr (, max-width)) |
| 71 | valstr)))) | 76 | valstr)))) |
| 72 | 77 | ||
| 78 | (defun gnus-encode-coding-string (string system) | ||
| 79 | string) | ||
| 80 | |||
| 73 | (eval-and-compile | 81 | (eval-and-compile |
| 74 | (if (string-match "XEmacs\\|Lucid" emacs-version) | 82 | (if (string-match "XEmacs\\|Lucid" emacs-version) |
| 75 | nil | 83 | nil |
| 76 | 84 | ||
| 77 | (defvar gnus-mouse-face-prop 'mouse-face | 85 | (defvar gnus-mouse-face-prop 'mouse-face |
| 78 | "Property used for highlighting mouse regions.") | 86 | "Property used for highlighting mouse regions.")) |
| 79 | |||
| 80 | (defvar gnus-article-x-face-command | ||
| 81 | "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | xv -quit -" | ||
| 82 | "String or function to be executed to display an X-Face header. | ||
| 83 | If it is a string, the command will be executed in a sub-shell | ||
| 84 | asynchronously. The compressed face will be piped to this command.")) | ||
| 85 | 87 | ||
| 86 | (cond | 88 | (cond |
| 87 | ((string-match "XEmacs\\|Lucid" emacs-version) | 89 | ((string-match "XEmacs\\|Lucid" emacs-version) |
| @@ -171,6 +173,7 @@ asynchronously. The compressed face will be piped to this command.")) | |||
| 171 | (fset 'gnus-cite-add-face 'gnus-mule-cite-add-face) | 173 | (fset 'gnus-cite-add-face 'gnus-mule-cite-add-face) |
| 172 | (fset 'gnus-max-width-function 'gnus-mule-max-width-function) | 174 | (fset 'gnus-max-width-function 'gnus-mule-max-width-function) |
| 173 | (fset 'gnus-summary-set-display-table 'ignore) | 175 | (fset 'gnus-summary-set-display-table 'ignore) |
| 176 | (fset 'gnus-encode-coding-string 'encode-coding-string) | ||
| 174 | 177 | ||
| 175 | (when (boundp 'gnus-check-before-posting) | 178 | (when (boundp 'gnus-check-before-posting) |
| 176 | (setq gnus-check-before-posting | 179 | (setq gnus-check-before-posting |
| @@ -203,6 +206,15 @@ asynchronously. The compressed face will be piped to this command.")) | |||
| 203 | (boundp 'mark-active) | 206 | (boundp 'mark-active) |
| 204 | mark-active)) | 207 | mark-active)) |
| 205 | 208 | ||
| 209 | (defun gnus-add-minor-mode (mode name map) | ||
| 210 | (if (fboundp 'add-minor-mode) | ||
| 211 | (add-minor-mode mode name map) | ||
| 212 | (unless (assq mode minor-mode-alist) | ||
| 213 | (push `(,mode ,name) minor-mode-alist)) | ||
| 214 | (unless (assq mode minor-mode-map-alist) | ||
| 215 | (push (cons mode map) | ||
| 216 | minor-mode-map-alist)))) | ||
| 217 | |||
| 206 | (provide 'gnus-ems) | 218 | (provide 'gnus-ems) |
| 207 | 219 | ||
| 208 | ;; Local Variables: | 220 | ;; Local Variables: |
diff --git a/lisp/gnus/gnus-gl.el b/lisp/gnus/gnus-gl.el index c035c0488bb..786cda40b86 100644 --- a/lisp/gnus/gnus-gl.el +++ b/lisp/gnus/gnus-gl.el | |||
| @@ -851,11 +851,8 @@ recommend using both scores and grouplens predictions together." | |||
| 851 | (when (and menu-bar-mode | 851 | (when (and menu-bar-mode |
| 852 | (gnus-visual-p 'grouplens-menu 'menu)) | 852 | (gnus-visual-p 'grouplens-menu 'menu)) |
| 853 | (gnus-grouplens-make-menu-bar)) | 853 | (gnus-grouplens-make-menu-bar)) |
| 854 | (unless (assq 'gnus-grouplens-mode minor-mode-alist) | 854 | (gnus-add-minor-mode |
| 855 | (push '(gnus-grouplens-mode " GroupLens") minor-mode-alist)) | 855 | 'gnus-grouplens-mode " GroupLens" gnus-grouplens-mode-map) |
| 856 | (unless (assq 'gnus-grouplens-mode minor-mode-map-alist) | ||
| 857 | (push (cons 'gnus-grouplens-mode gnus-grouplens-mode-map) | ||
| 858 | minor-mode-map-alist)) | ||
| 859 | (run-hooks 'gnus-grouplens-mode-hook)))) | 856 | (run-hooks 'gnus-grouplens-mode-hook)))) |
| 860 | 857 | ||
| 861 | (provide 'gnus-gl) | 858 | (provide 'gnus-gl) |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 521fd21d0dd..5caa86ec704 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -84,8 +84,10 @@ with the best level." | |||
| 84 | 84 | ||
| 85 | (defcustom gnus-permanently-visible-groups nil | 85 | (defcustom gnus-permanently-visible-groups nil |
| 86 | "*Regexp to match groups that should always be listed in the group buffer. | 86 | "*Regexp to match groups that should always be listed in the group buffer. |
| 87 | This means that they will still be listed when there are no unread | 87 | This means that they will still be listed even when there are no |
| 88 | articles in the groups." | 88 | unread articles in the groups. |
| 89 | |||
| 90 | If nil, no groups are permanently visible." | ||
| 89 | :group 'gnus-group-listing | 91 | :group 'gnus-group-listing |
| 90 | :type '(choice regexp (const nil))) | 92 | :type '(choice regexp (const nil))) |
| 91 | 93 | ||
| @@ -446,7 +448,7 @@ ticked: The number of ticked articles." | |||
| 446 | "r" gnus-group-read-init-file | 448 | "r" gnus-group-read-init-file |
| 447 | "B" gnus-group-browse-foreign-server | 449 | "B" gnus-group-browse-foreign-server |
| 448 | "b" gnus-group-check-bogus-groups | 450 | "b" gnus-group-check-bogus-groups |
| 449 | "F" gnus-find-new-newsgroups | 451 | "F" gnus-group-find-new-groups |
| 450 | "\C-c\C-d" gnus-group-describe-group | 452 | "\C-c\C-d" gnus-group-describe-group |
| 451 | "\M-d" gnus-group-describe-all-groups | 453 | "\M-d" gnus-group-describe-all-groups |
| 452 | "\C-c\C-a" gnus-group-apropos | 454 | "\C-c\C-a" gnus-group-apropos |
| @@ -485,7 +487,7 @@ ticked: The number of ticked articles." | |||
| 485 | "m" gnus-group-mark-group | 487 | "m" gnus-group-mark-group |
| 486 | "u" gnus-group-unmark-group | 488 | "u" gnus-group-unmark-group |
| 487 | "w" gnus-group-mark-region | 489 | "w" gnus-group-mark-region |
| 488 | "m" gnus-group-mark-buffer | 490 | "b" gnus-group-mark-buffer |
| 489 | "r" gnus-group-mark-regexp | 491 | "r" gnus-group-mark-regexp |
| 490 | "U" gnus-group-unmark-all-groups) | 492 | "U" gnus-group-unmark-all-groups) |
| 491 | 493 | ||
| @@ -604,8 +606,7 @@ ticked: The number of ticked articles." | |||
| 604 | (gnus-group-group-name)] | 606 | (gnus-group-group-name)] |
| 605 | ["Info" gnus-group-edit-group (gnus-group-group-name)] | 607 | ["Info" gnus-group-edit-group (gnus-group-group-name)] |
| 606 | ["Local kill file" gnus-group-edit-local-kill (gnus-group-group-name)] | 608 | ["Local kill file" gnus-group-edit-local-kill (gnus-group-group-name)] |
| 607 | ["Global kill file" gnus-group-edit-global-kill t]) | 609 | ["Global kill file" gnus-group-edit-global-kill t]))) |
| 608 | )) | ||
| 609 | 610 | ||
| 610 | (easy-menu-define | 611 | (easy-menu-define |
| 611 | gnus-group-group-menu gnus-group-mode-map "" | 612 | gnus-group-group-menu gnus-group-mode-map "" |
| @@ -692,11 +693,10 @@ ticked: The number of ticked articles." | |||
| 692 | ["First unread group" gnus-group-first-unread-group t] | 693 | ["First unread group" gnus-group-first-unread-group t] |
| 693 | ["Best unread group" gnus-group-best-unread-group t]) | 694 | ["Best unread group" gnus-group-best-unread-group t]) |
| 694 | ["Delete bogus groups" gnus-group-check-bogus-groups t] | 695 | ["Delete bogus groups" gnus-group-check-bogus-groups t] |
| 695 | ["Find new newsgroups" gnus-find-new-newsgroups t] | 696 | ["Find new newsgroups" gnus-group-find-new-groups t] |
| 696 | ["Transpose" gnus-group-transpose-groups | 697 | ["Transpose" gnus-group-transpose-groups |
| 697 | (gnus-group-group-name)] | 698 | (gnus-group-group-name)] |
| 698 | ["Read a directory as a group..." gnus-group-enter-directory t] | 699 | ["Read a directory as a group..." gnus-group-enter-directory t])) |
| 699 | )) | ||
| 700 | 700 | ||
| 701 | (easy-menu-define | 701 | (easy-menu-define |
| 702 | gnus-group-misc-menu gnus-group-mode-map "" | 702 | gnus-group-misc-menu gnus-group-mode-map "" |
| @@ -727,8 +727,7 @@ ticked: The number of ticked articles." | |||
| 727 | ["Flush score cache" gnus-score-flush-cache t] | 727 | ["Flush score cache" gnus-score-flush-cache t] |
| 728 | ["Toggle topics" gnus-topic-mode t] | 728 | ["Toggle topics" gnus-topic-mode t] |
| 729 | ["Exit from Gnus" gnus-group-exit t] | 729 | ["Exit from Gnus" gnus-group-exit t] |
| 730 | ["Exit without saving" gnus-group-quit t] | 730 | ["Exit without saving" gnus-group-quit t])) |
| 731 | )) | ||
| 732 | 731 | ||
| 733 | (run-hooks 'gnus-group-menu-hook))) | 732 | (run-hooks 'gnus-group-menu-hook))) |
| 734 | 733 | ||
| @@ -1218,7 +1217,9 @@ already." | |||
| 1218 | (not (zerop (buffer-size)))))) | 1217 | (not (zerop (buffer-size)))))) |
| 1219 | (mode-string (eval gformat))) | 1218 | (mode-string (eval gformat))) |
| 1220 | ;; Say whether the dribble buffer has been modified. | 1219 | ;; Say whether the dribble buffer has been modified. |
| 1221 | (setq mode-line-modified (if modified "**" "--")) | 1220 | (setq mode-line-modified |
| 1221 | (if modified (car gnus-mode-line-modified) | ||
| 1222 | (cdr gnus-mode-line-modified))) | ||
| 1222 | ;; If the line is too long, we chop it off. | 1223 | ;; If the line is too long, we chop it off. |
| 1223 | (when (> (length mode-string) max-len) | 1224 | (when (> (length mode-string) max-len) |
| 1224 | (setq mode-string (substring mode-string 0 (- max-len 4)))) | 1225 | (setq mode-string (substring mode-string 0 (- max-len 4)))) |
| @@ -1278,24 +1279,26 @@ If FIRST-TOO, the current line is also eligible as a target." | |||
| 1278 | (not (eobp)) | 1279 | (not (eobp)) |
| 1279 | (not (setq | 1280 | (not (setq |
| 1280 | found | 1281 | found |
| 1281 | (and (or all | 1282 | (and |
| 1282 | (and | 1283 | (get-text-property (point) 'gnus-group) |
| 1283 | (let ((unread | 1284 | (or all |
| 1284 | (get-text-property (point) 'gnus-unread))) | 1285 | (and |
| 1285 | (and (numberp unread) (> unread 0))) | 1286 | (let ((unread |
| 1286 | (setq lev (get-text-property (point) | 1287 | (get-text-property (point) 'gnus-unread))) |
| 1288 | (and (numberp unread) (> unread 0))) | ||
| 1289 | (setq lev (get-text-property (point) | ||
| 1290 | 'gnus-level)) | ||
| 1291 | (<= lev gnus-level-subscribed))) | ||
| 1292 | (or (not level) | ||
| 1293 | (and (setq lev (get-text-property (point) | ||
| 1287 | 'gnus-level)) | 1294 | 'gnus-level)) |
| 1288 | (<= lev gnus-level-subscribed))) | 1295 | (or (= lev level) |
| 1289 | (or (not level) | 1296 | (and (< lev low) |
| 1290 | (and (setq lev (get-text-property (point) | 1297 | (< level lev) |
| 1291 | 'gnus-level)) | 1298 | (progn |
| 1292 | (or (= lev level) | 1299 | (setq low lev) |
| 1293 | (and (< lev low) | 1300 | (setq pos (point)) |
| 1294 | (< level lev) | 1301 | nil)))))))) |
| 1295 | (progn | ||
| 1296 | (setq low lev) | ||
| 1297 | (setq pos (point)) | ||
| 1298 | nil)))))))) | ||
| 1299 | (zerop (forward-line way))))) | 1302 | (zerop (forward-line way))))) |
| 1300 | (if found | 1303 | (if found |
| 1301 | (progn (gnus-group-position-point) t) | 1304 | (progn (gnus-group-position-point) t) |
| @@ -1449,10 +1452,14 @@ Take into consideration N (the prefix) and the list of marked groups." | |||
| 1449 | FUNCTION will be called with the group name as the paremeter | 1452 | FUNCTION will be called with the group name as the paremeter |
| 1450 | and with point over the group in question." | 1453 | and with point over the group in question." |
| 1451 | (let ((groups (gnus-group-process-prefix arg)) | 1454 | (let ((groups (gnus-group-process-prefix arg)) |
| 1455 | (window (selected-window)) | ||
| 1452 | group) | 1456 | group) |
| 1453 | (while (setq group (pop groups)) | 1457 | (while (setq group (pop groups)) |
| 1458 | (select-window window) | ||
| 1454 | (gnus-group-remove-mark group) | 1459 | (gnus-group-remove-mark group) |
| 1455 | (funcall function group)))) | 1460 | (save-selected-window |
| 1461 | (save-excursion | ||
| 1462 | (funcall function group)))))) | ||
| 1456 | 1463 | ||
| 1457 | (put 'gnus-group-iterate 'lisp-indent-function 1) | 1464 | (put 'gnus-group-iterate 'lisp-indent-function 1) |
| 1458 | 1465 | ||
| @@ -1961,7 +1968,7 @@ and NEW-NAME will be prompted for." | |||
| 1961 | (let ((entry (assoc (completing-read "Create group: " gnus-useful-groups | 1968 | (let ((entry (assoc (completing-read "Create group: " gnus-useful-groups |
| 1962 | nil t) | 1969 | nil t) |
| 1963 | gnus-useful-groups))) | 1970 | gnus-useful-groups))) |
| 1964 | (list (cadr entry) (nth 2 entry)))) | 1971 | (list (cadr entry) (caddr entry)))) |
| 1965 | (setq method (gnus-copy-sequence method)) | 1972 | (setq method (gnus-copy-sequence method)) |
| 1966 | (let (entry) | 1973 | (let (entry) |
| 1967 | (while (setq entry (memq (assq 'eval method) method)) | 1974 | (while (setq entry (memq (assq 'eval method) method)) |
| @@ -2026,15 +2033,16 @@ If SOLID (the prefix), create a solid group." | |||
| 2026 | (let* ((group | 2033 | (let* ((group |
| 2027 | (if solid (gnus-read-group "Group name: ") | 2034 | (if solid (gnus-read-group "Group name: ") |
| 2028 | (message-unique-id))) | 2035 | (message-unique-id))) |
| 2036 | (default-type (or (car gnus-group-web-type-history) | ||
| 2037 | (symbol-name (caar nnweb-type-definition)))) | ||
| 2029 | (type | 2038 | (type |
| 2030 | (completing-read | 2039 | (gnus-string-or |
| 2031 | "Search engine type: " | 2040 | (completing-read |
| 2032 | (mapcar (lambda (elem) (list (symbol-name (car elem)))) | 2041 | (format "Search engine type (default %s): " default-type) |
| 2033 | nnweb-type-definition) | 2042 | (mapcar (lambda (elem) (list (symbol-name (car elem)))) |
| 2034 | nil t (cons (or (car gnus-group-web-type-history) | 2043 | nnweb-type-definition) |
| 2035 | (symbol-name (caar nnweb-type-definition))) | 2044 | nil t nil 'gnus-group-web-type-history) |
| 2036 | 0) | 2045 | default-type)) |
| 2037 | 'gnus-group-web-type-history)) | ||
| 2038 | (search | 2046 | (search |
| 2039 | (read-string | 2047 | (read-string |
| 2040 | "Search string: " | 2048 | "Search string: " |
| @@ -2147,7 +2155,7 @@ score file entries for articles to include in the group." | |||
| 2147 | (pgroup (gnus-group-prefixed-name group method))) | 2155 | (pgroup (gnus-group-prefixed-name group method))) |
| 2148 | ;; Check whether it exists already. | 2156 | ;; Check whether it exists already. |
| 2149 | (when (gnus-gethash pgroup gnus-newsrc-hashtb) | 2157 | (when (gnus-gethash pgroup gnus-newsrc-hashtb) |
| 2150 | (error "Group %s already exists." pgroup)) | 2158 | (error "Group %s already exists" pgroup)) |
| 2151 | ;; Subscribe the new group after the group on the current line. | 2159 | ;; Subscribe the new group after the group on the current line. |
| 2152 | (gnus-subscribe-group pgroup (gnus-group-group-name) method) | 2160 | (gnus-subscribe-group pgroup (gnus-group-group-name) method) |
| 2153 | (gnus-group-update-group pgroup) | 2161 | (gnus-group-update-group pgroup) |
| @@ -2878,7 +2886,7 @@ re-scanning. If ARG is non-nil and not a number, this will force | |||
| 2878 | (gnus-group-list-groups (and (numberp arg) | 2886 | (gnus-group-list-groups (and (numberp arg) |
| 2879 | (max (car gnus-group-list-mode) arg))))) | 2887 | (max (car gnus-group-list-mode) arg))))) |
| 2880 | 2888 | ||
| 2881 | (defun gnus-group-get-new-news-this-group (&optional n) | 2889 | (defun gnus-group-get-new-news-this-group (&optional n dont-scan) |
| 2882 | "Check for newly arrived news in the current group (and the N-1 next groups). | 2890 | "Check for newly arrived news in the current group (and the N-1 next groups). |
| 2883 | The difference between N and the number of newsgroup checked is returned. | 2891 | The difference between N and the number of newsgroup checked is returned. |
| 2884 | If N is negative, this group and the N-1 previous groups will be checked." | 2892 | If N is negative, this group and the N-1 previous groups will be checked." |
| @@ -2892,7 +2900,7 @@ If N is negative, this group and the N-1 previous groups will be checked." | |||
| 2892 | (gnus-group-remove-mark group) | 2900 | (gnus-group-remove-mark group) |
| 2893 | ;; Bypass any previous denials from the server. | 2901 | ;; Bypass any previous denials from the server. |
| 2894 | (gnus-remove-denial (gnus-find-method-for-group group)) | 2902 | (gnus-remove-denial (gnus-find-method-for-group group)) |
| 2895 | (if (gnus-activate-group group 'scan) | 2903 | (if (gnus-activate-group group (if dont-scan nil 'scan)) |
| 2896 | (progn | 2904 | (progn |
| 2897 | (gnus-get-unread-articles-in-group | 2905 | (gnus-get-unread-articles-in-group |
| 2898 | (gnus-get-info group) (gnus-active group) t) | 2906 | (gnus-get-info group) (gnus-active group) t) |
| @@ -2917,11 +2925,11 @@ to use." | |||
| 2917 | (interactive | 2925 | (interactive |
| 2918 | (list | 2926 | (list |
| 2919 | (gnus-group-group-name) | 2927 | (gnus-group-group-name) |
| 2920 | (cond (current-prefix-arg | 2928 | (when current-prefix-arg |
| 2921 | (completing-read | 2929 | (completing-read |
| 2922 | "Faq dir: " (and (listp gnus-group-faq-directory) | 2930 | "Faq dir: " (and (listp gnus-group-faq-directory) |
| 2923 | (mapcar (lambda (file) (list file)) | 2931 | (mapcar (lambda (file) (list file)) |
| 2924 | gnus-group-faq-directory))))))) | 2932 | gnus-group-faq-directory)))))) |
| 2925 | (unless group | 2933 | (unless group |
| 2926 | (error "No group name given")) | 2934 | (error "No group name given")) |
| 2927 | (let ((dirs (or faq-dir gnus-group-faq-directory)) | 2935 | (let ((dirs (or faq-dir gnus-group-faq-directory)) |
| @@ -3082,7 +3090,8 @@ If FORCE, force saving whether it is necessary or not." | |||
| 3082 | (defun gnus-group-read-init-file () | 3090 | (defun gnus-group-read-init-file () |
| 3083 | "Read the Gnus elisp init file." | 3091 | "Read the Gnus elisp init file." |
| 3084 | (interactive) | 3092 | (interactive) |
| 3085 | (gnus-read-init-file)) | 3093 | (gnus-read-init-file) |
| 3094 | (gnus-message 5 "Read %s" gnus-init-file)) | ||
| 3086 | 3095 | ||
| 3087 | (defun gnus-group-check-bogus-groups (&optional silent) | 3096 | (defun gnus-group-check-bogus-groups (&optional silent) |
| 3088 | "Check bogus newsgroups. | 3097 | "Check bogus newsgroups. |
| @@ -3092,6 +3101,15 @@ group." | |||
| 3092 | (gnus-check-bogus-newsgroups (and (not silent) (not gnus-expert-user))) | 3101 | (gnus-check-bogus-newsgroups (and (not silent) (not gnus-expert-user))) |
| 3093 | (gnus-group-list-groups)) | 3102 | (gnus-group-list-groups)) |
| 3094 | 3103 | ||
| 3104 | (defun gnus-group-find-new-groups (&optional arg) | ||
| 3105 | "Search for new groups and add them. | ||
| 3106 | Each new group will be treated with `gnus-subscribe-newsgroup-method.' | ||
| 3107 | If ARG (the prefix), use the `ask-server' method to query | ||
| 3108 | the server for new groups." | ||
| 3109 | (interactive "P") | ||
| 3110 | (gnus-find-new-newsgroups arg) | ||
| 3111 | (gnus-group-list-groups)) | ||
| 3112 | |||
| 3095 | (defun gnus-group-edit-global-kill (&optional article group) | 3113 | (defun gnus-group-edit-global-kill (&optional article group) |
| 3096 | "Edit the global kill file. | 3114 | "Edit the global kill file. |
| 3097 | If GROUP, edit that local kill file instead." | 3115 | If GROUP, edit that local kill file instead." |
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 70d147fda0e..b11ad1a01a0 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el | |||
| @@ -377,7 +377,7 @@ If GROUP is nil, all groups on METHOD are scanned." | |||
| 377 | last))) | 377 | last))) |
| 378 | 378 | ||
| 379 | (defun gnus-request-replace-article (article group buffer) | 379 | (defun gnus-request-replace-article (article group buffer) |
| 380 | (let ((func (car (gnus-find-method-for-group group)))) | 380 | (let ((func (car (gnus-group-name-to-method group)))) |
| 381 | (funcall (intern (format "%s-request-replace-article" func)) | 381 | (funcall (intern (format "%s-request-replace-article" func)) |
| 382 | article (gnus-group-real-name group) buffer))) | 382 | article (gnus-group-real-name group) buffer))) |
| 383 | 383 | ||
diff --git a/lisp/gnus/gnus-move.el b/lisp/gnus/gnus-move.el index fcacdee8c35..f00fb3b5ac1 100644 --- a/lisp/gnus/gnus-move.el +++ b/lisp/gnus/gnus-move.el | |||
| @@ -61,15 +61,18 @@ Update the .newsrc.eld file to reflect the change of nntp server." | |||
| 61 | "Move group INFO from FROM-SERVER to TO-SERVER." | 61 | "Move group INFO from FROM-SERVER to TO-SERVER." |
| 62 | (let ((group (gnus-info-group info)) | 62 | (let ((group (gnus-info-group info)) |
| 63 | to-active hashtb type mark marks | 63 | to-active hashtb type mark marks |
| 64 | to-article to-reads to-marks article) | 64 | to-article to-reads to-marks article |
| 65 | act-articles) | ||
| 65 | (gnus-message 7 "Translating %s..." group) | 66 | (gnus-message 7 "Translating %s..." group) |
| 66 | (when (gnus-request-group group nil to-server) | 67 | (when (gnus-request-group group nil to-server) |
| 67 | (setq to-active (gnus-parse-active) | 68 | (setq to-active (gnus-parse-active) |
| 68 | hashtb (gnus-make-hashtable 1024)) | 69 | hashtb (gnus-make-hashtable 1024) |
| 70 | act-articles (gnus-uncompress-range to-active)) | ||
| 69 | ;; Fetch the headers from the `to-server'. | 71 | ;; Fetch the headers from the `to-server'. |
| 70 | (when (and to-active | 72 | (when (and to-active |
| 73 | act-articles | ||
| 71 | (setq type (gnus-retrieve-headers | 74 | (setq type (gnus-retrieve-headers |
| 72 | (gnus-uncompress-range to-active) | 75 | act-articles |
| 73 | group to-server))) | 76 | group to-server))) |
| 74 | ;; Convert HEAD headers. I don't care. | 77 | ;; Convert HEAD headers. I don't care. |
| 75 | (when (eq type 'headers) | 78 | (when (eq type 'headers) |
| @@ -127,7 +130,7 @@ Update the .newsrc.eld file to reflect the change of nntp server." | |||
| 127 | ;; into the Gnus info format. | 130 | ;; into the Gnus info format. |
| 128 | (setq to-reads | 131 | (setq to-reads |
| 129 | (gnus-range-add | 132 | (gnus-range-add |
| 130 | (gnus-compress-sequence (sort to-reads '<) t) | 133 | (gnus-compress-sequence (and to-reads (sort to-reads '<)) t) |
| 131 | (cons 1 (1- (car to-active))))) | 134 | (cons 1 (1- (car to-active))))) |
| 132 | (gnus-info-set-read info to-reads) | 135 | (gnus-info-set-read info to-reads) |
| 133 | ;; Do the marks. I'm sure y'all understand what's | 136 | ;; Do the marks. I'm sure y'all understand what's |
| @@ -144,7 +147,8 @@ Update the .newsrc.eld file to reflect the change of nntp server." | |||
| 144 | (cons article (cdr a))))) | 147 | (cons article (cdr a))))) |
| 145 | (setq a lists) | 148 | (setq a lists) |
| 146 | (while a | 149 | (while a |
| 147 | (setcdr (car a) (gnus-compress-sequence (sort (cdar a) '<))) | 150 | (setcdr (car a) (gnus-compress-sequence |
| 151 | (and (cdar a) (sort (cdar a) '<)))) | ||
| 148 | (pop a)) | 152 | (pop a)) |
| 149 | (gnus-info-set-marks info lists t))))) | 153 | (gnus-info-set-marks info lists t))))) |
| 150 | (gnus-message 7 "Translating %s...done" group))) | 154 | (gnus-message 7 "Translating %s...done" group))) |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index efbb5e0333a..fc94bb2d2a8 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -514,6 +514,7 @@ If SILENT, don't prompt the user." | |||
| 514 | 514 | ||
| 515 | ;; Dummy to avoid byte-compile warning. | 515 | ;; Dummy to avoid byte-compile warning. |
| 516 | (defvar nnspool-rejected-article-hook) | 516 | (defvar nnspool-rejected-article-hook) |
| 517 | (defvar xemacs-codename) | ||
| 517 | 518 | ||
| 518 | ;;; Since the X-Newsreader/X-Mailer are ``vanity'' headers, they might | 519 | ;;; Since the X-Newsreader/X-Mailer are ``vanity'' headers, they might |
| 519 | ;;; as well include the Emacs version as well. | 520 | ;;; as well include the Emacs version as well. |
| @@ -539,7 +540,9 @@ If SILENT, don't prompt the user." | |||
| 539 | (substring emacs-version | 540 | (substring emacs-version |
| 540 | (match-beginning 3) | 541 | (match-beginning 3) |
| 541 | (match-end 3)) | 542 | (match-end 3)) |
| 542 | ""))) | 543 | "") |
| 544 | (if (boundp 'xemacs-codename) | ||
| 545 | (concat " - \"" xemacs-codename "\"")))) | ||
| 543 | (t emacs-version)))) | 546 | (t emacs-version)))) |
| 544 | 547 | ||
| 545 | ;; Written by "Mr. Per Persson" <pp@gnu.ai.mit.edu>. | 548 | ;; Written by "Mr. Per Persson" <pp@gnu.ai.mit.edu>. |
| @@ -693,6 +696,8 @@ The current group name will be inserted at \"%s\".") | |||
| 693 | (message-goto-subject) | 696 | (message-goto-subject) |
| 694 | (re-search-forward " *$") | 697 | (re-search-forward " *$") |
| 695 | (replace-match " (crosspost notification)" t t) | 698 | (replace-match " (crosspost notification)" t t) |
| 699 | (when (fboundp 'deactivate-mark) | ||
| 700 | (deactivate-mark)) | ||
| 696 | (when (gnus-y-or-n-p "Send this complaint? ") | 701 | (when (gnus-y-or-n-p "Send this complaint? ") |
| 697 | (message-send-and-exit))))))) | 702 | (message-send-and-exit))))))) |
| 698 | 703 | ||
diff --git a/lisp/gnus/gnus-nocem.el b/lisp/gnus/gnus-nocem.el index f56f8cf535f..637743a50a7 100644 --- a/lisp/gnus/gnus-nocem.el +++ b/lisp/gnus/gnus-nocem.el | |||
| @@ -45,13 +45,13 @@ | |||
| 45 | :type '(repeat (string :tag "Group"))) | 45 | :type '(repeat (string :tag "Group"))) |
| 46 | 46 | ||
| 47 | (defcustom gnus-nocem-issuers | 47 | (defcustom gnus-nocem-issuers |
| 48 | '("AutoMoose-1" "Automoose-1" ; CancelMoose[tm] | 48 | '("AutoMoose-1" "Automoose-1" ; CancelMoose[tm] |
| 49 | "rbraver@ohww.norman.ok.us" ; Robert Braver | 49 | "rbraver@ohww.norman.ok.us" ; Robert Braver |
| 50 | "clewis@ferret.ocunix.on.ca;" ; Chris Lewis | 50 | "clewis@ferret.ocunix.on.ca" ; Chris Lewis |
| 51 | "jem@xpat.com;" ; Despammer from Korea | 51 | "jem@xpat.com" ; Despammer from Korea |
| 52 | "snowhare@xmission.com" ; Benjamin "Snowhare" Franz | 52 | "snowhare@xmission.com" ; Benjamin "Snowhare" Franz |
| 53 | "red@redpoll.mrfs.oh.us (Richard E. Depew)" ; ARMM! ARMM! | 53 | "red@redpoll.mrfs.oh.us (Richard E. Depew)" ; ARMM! ARMM! |
| 54 | ) | 54 | ) |
| 55 | "List of NoCeM issuers to pay attention to." | 55 | "List of NoCeM issuers to pay attention to." |
| 56 | :group 'gnus-nocem | 56 | :group 'gnus-nocem |
| 57 | :type '(repeat string)) | 57 | :type '(repeat string)) |
| @@ -98,6 +98,23 @@ matches an previously scanned and verified nocem message." | |||
| 98 | (defun gnus-nocem-cache-file () | 98 | (defun gnus-nocem-cache-file () |
| 99 | (concat (file-name-as-directory gnus-nocem-directory) "cache")) | 99 | (concat (file-name-as-directory gnus-nocem-directory) "cache")) |
| 100 | 100 | ||
| 101 | ;; | ||
| 102 | ;; faster lookups for group names: | ||
| 103 | ;; | ||
| 104 | |||
| 105 | (defvar gnus-nocem-real-group-hashtb nil | ||
| 106 | "Real-name mappings of subscribed groups.") | ||
| 107 | |||
| 108 | (defun gnus-fill-real-hashtb () | ||
| 109 | "Fill up a hash table with the real-name mappings from the user's | ||
| 110 | active file." | ||
| 111 | (setq gnus-nocem-real-group-hashtb (gnus-make-hashtable | ||
| 112 | (length gnus-newsrc-alist))) | ||
| 113 | (mapcar (lambda (group) | ||
| 114 | (setq group (gnus-group-real-name (car group))) | ||
| 115 | (gnus-sethash group t gnus-nocem-real-group-hashtb)) | ||
| 116 | gnus-newsrc-alist)) | ||
| 117 | |||
| 101 | (defun gnus-nocem-scan-groups () | 118 | (defun gnus-nocem-scan-groups () |
| 102 | "Scan all NoCeM groups for new NoCeM messages." | 119 | "Scan all NoCeM groups for new NoCeM messages." |
| 103 | (interactive) | 120 | (interactive) |
| @@ -107,6 +124,8 @@ matches an previously scanned and verified nocem message." | |||
| 107 | (gnus-make-directory gnus-nocem-directory) | 124 | (gnus-make-directory gnus-nocem-directory) |
| 108 | ;; Load any previous NoCeM headers. | 125 | ;; Load any previous NoCeM headers. |
| 109 | (gnus-nocem-load-cache) | 126 | (gnus-nocem-load-cache) |
| 127 | ;; Get the group name mappings: | ||
| 128 | (gnus-fill-real-hashtb) | ||
| 110 | ;; Read the active file if it hasn't been read yet. | 129 | ;; Read the active file if it hasn't been read yet. |
| 111 | (and (file-exists-p (gnus-nocem-active-file)) | 130 | (and (file-exists-p (gnus-nocem-active-file)) |
| 112 | (not gnus-nocem-active) | 131 | (not gnus-nocem-active) |
| @@ -187,6 +206,8 @@ matches an previously scanned and verified nocem message." | |||
| 187 | (narrow-to-region b e) | 206 | (narrow-to-region b e) |
| 188 | (setq issuer (mail-fetch-field "issuer")) | 207 | (setq issuer (mail-fetch-field "issuer")) |
| 189 | (widen) | 208 | (widen) |
| 209 | (or (member issuer gnus-nocem-issuers) | ||
| 210 | (message "invalid NoCeM issuer: %s" issuer)) | ||
| 190 | (and (member issuer gnus-nocem-issuers) ; We like her.... | 211 | (and (member issuer gnus-nocem-issuers) ; We like her.... |
| 191 | (gnus-nocem-verify-issuer issuer) ; She is who she says she is... | 212 | (gnus-nocem-verify-issuer issuer) ; She is who she says she is... |
| 192 | (gnus-nocem-enter-article) ; We gobble the message.. | 213 | (gnus-nocem-enter-article) ; We gobble the message.. |
| @@ -196,7 +217,8 @@ matches an previously scanned and verified nocem message." | |||
| 196 | (defun gnus-nocem-verify-issuer (person) | 217 | (defun gnus-nocem-verify-issuer (person) |
| 197 | "Verify using PGP that the canceler is who she says she is." | 218 | "Verify using PGP that the canceler is who she says she is." |
| 198 | (if (fboundp gnus-nocem-verifyer) | 219 | (if (fboundp gnus-nocem-verifyer) |
| 199 | (funcall gnus-nocem-verifyer) | 220 | (ignore-errors |
| 221 | (funcall gnus-nocem-verifyer)) | ||
| 200 | ;; If we don't have Mailcrypt, then we use the message anyway. | 222 | ;; If we don't have Mailcrypt, then we use the message anyway. |
| 201 | t)) | 223 | t)) |
| 202 | 224 | ||
| @@ -223,7 +245,8 @@ matches an previously scanned and verified nocem message." | |||
| 223 | ;; Make sure all entries in the hashtb are bound. | 245 | ;; Make sure all entries in the hashtb are bound. |
| 224 | (set group nil)) | 246 | (set group nil)) |
| 225 | (t | 247 | (t |
| 226 | (when (gnus-gethash (symbol-name group) gnus-newsrc-hashtb) | 248 | (when (gnus-gethash (gnus-group-real-name (symbol-name group)) |
| 249 | gnus-nocem-real-group-hashtb) | ||
| 227 | ;; Valid group. | 250 | ;; Valid group. |
| 228 | (beginning-of-line) | 251 | (beginning-of-line) |
| 229 | (while (= (following-char) ?\t) | 252 | (while (= (following-char) ?\t) |
| @@ -294,7 +317,8 @@ matches an previously scanned and verified nocem message." | |||
| 294 | gnus-nocem-hashtb nil | 317 | gnus-nocem-hashtb nil |
| 295 | gnus-nocem-active nil | 318 | gnus-nocem-active nil |
| 296 | gnus-nocem-touched-alist nil | 319 | gnus-nocem-touched-alist nil |
| 297 | gnus-nocem-seen-message-ids nil)) | 320 | gnus-nocem-seen-message-ids nil |
| 321 | gnus-nocem-real-group-hashtb nil)) | ||
| 298 | 322 | ||
| 299 | (defun gnus-nocem-unwanted-article-p (id) | 323 | (defun gnus-nocem-unwanted-article-p (id) |
| 300 | "Say whether article ID in the current group is wanted." | 324 | "Say whether article ID in the current group is wanted." |
diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el index 54d92822e84..6b86f4df3ca 100644 --- a/lisp/gnus/gnus-range.el +++ b/lisp/gnus/gnus-range.el | |||
| @@ -209,7 +209,7 @@ Note: LIST has to be sorted over `<'." | |||
| 209 | (setcar ranges (cons (car ranges) | 209 | (setcar ranges (cons (car ranges) |
| 210 | (cadr ranges))) | 210 | (cadr ranges))) |
| 211 | (setcdr ranges (cddr ranges))) | 211 | (setcdr ranges (cddr ranges))) |
| 212 | (when (= (1+ (car ranges)) (car (cadr ranges))) | 212 | (when (= (1+ (car ranges)) (caadr ranges)) |
| 213 | (setcar (cadr ranges) (car ranges)) | 213 | (setcar (cadr ranges) (car ranges)) |
| 214 | (setcar ranges (cadr ranges)) | 214 | (setcar ranges (cadr ranges)) |
| 215 | (setcdr ranges (cddr ranges))))) | 215 | (setcdr ranges (cddr ranges))))) |
| @@ -218,8 +218,8 @@ Note: LIST has to be sorted over `<'." | |||
| 218 | (when (= (1+ (cdar ranges)) (cadr ranges)) | 218 | (when (= (1+ (cdar ranges)) (cadr ranges)) |
| 219 | (setcdr (car ranges) (cadr ranges)) | 219 | (setcdr (car ranges) (cadr ranges)) |
| 220 | (setcdr ranges (cddr ranges))) | 220 | (setcdr ranges (cddr ranges))) |
| 221 | (when (= (1+ (cdar ranges)) (car (cadr ranges))) | 221 | (when (= (1+ (cdar ranges)) (caadr ranges)) |
| 222 | (setcdr (car ranges) (cdr (cadr ranges))) | 222 | (setcdr (car ranges) (cdadr ranges)) |
| 223 | (setcdr ranges (cddr ranges)))))) | 223 | (setcdr ranges (cddr ranges)))))) |
| 224 | (setq ranges (cdr ranges))) | 224 | (setq ranges (cdr ranges))) |
| 225 | out))) | 225 | out))) |
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index c8f39b3cec2..1f680e29416 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el | |||
| @@ -36,22 +36,32 @@ | |||
| 36 | (defvar gnus-pick-mode nil | 36 | (defvar gnus-pick-mode nil |
| 37 | "Minor mode for providing a pick-and-read interface in Gnus summary buffers.") | 37 | "Minor mode for providing a pick-and-read interface in Gnus summary buffers.") |
| 38 | 38 | ||
| 39 | (defvar gnus-pick-display-summary nil | 39 | (defcustom gnus-pick-display-summary nil |
| 40 | "*Display summary while reading.") | 40 | "*Display summary while reading." |
| 41 | 41 | :type 'boolean | |
| 42 | (defvar gnus-pick-mode-hook nil | 42 | :group 'gnus-summary-pick) |
| 43 | "Hook run in summary pick mode buffers.") | 43 | |
| 44 | 44 | (defcustom gnus-pick-mode-hook nil | |
| 45 | (defvar gnus-mark-unpicked-articles-as-read nil | 45 | "Hook run in summary pick mode buffers." |
| 46 | "*If non-nil, mark all unpicked articles as read.") | 46 | :type 'hook |
| 47 | 47 | :group 'gnus-summary-pick) | |
| 48 | (defvar gnus-pick-elegant-flow t | 48 | |
| 49 | "If non-nil, gnus-pick-start-reading will run gnus-summary-next-group when no articles have been picked.") | 49 | (defcustom gnus-mark-unpicked-articles-as-read nil |
| 50 | 50 | "*If non-nil, mark all unpicked articles as read." | |
| 51 | (defvar gnus-summary-pick-line-format | 51 | :type 'boolean |
| 52 | :group 'gnus-summary-pick) | ||
| 53 | |||
| 54 | (defcustom gnus-pick-elegant-flow t | ||
| 55 | "If non-nil, gnus-pick-start-reading will run gnus-summary-next-group when no articles have been picked." | ||
| 56 | :type 'boolean | ||
| 57 | :group 'gnus-summary-pick) | ||
| 58 | |||
| 59 | (defcustom gnus-summary-pick-line-format | ||
| 52 | "%-5P %U\%R\%z\%I\%(%[%4L: %-20,20n%]%) %s\n" | 60 | "%-5P %U\%R\%z\%I\%(%[%4L: %-20,20n%]%) %s\n" |
| 53 | "*The format specification of the lines in pick buffers. | 61 | "*The format specification of the lines in pick buffers. |
| 54 | It accepts the same format specs that `gnus-summary-line-format' does.") | 62 | It accepts the same format specs that `gnus-summary-line-format' does." |
| 63 | :type 'string | ||
| 64 | :group 'gnus-summary-pick) | ||
| 55 | 65 | ||
| 56 | ;;; Internal variables. | 66 | ;;; Internal variables. |
| 57 | 67 | ||
| @@ -122,11 +132,7 @@ It accepts the same format specs that `gnus-summary-line-format' does.") | |||
| 122 | ;; Set up the menu. | 132 | ;; Set up the menu. |
| 123 | (when (gnus-visual-p 'pick-menu 'menu) | 133 | (when (gnus-visual-p 'pick-menu 'menu) |
| 124 | (gnus-pick-make-menu-bar)) | 134 | (gnus-pick-make-menu-bar)) |
| 125 | (unless (assq 'gnus-pick-mode minor-mode-alist) | 135 | (gnus-add-minor-mode 'gnus-pick-mode " Pick" gnus-pick-mode-map) |
| 126 | (push '(gnus-pick-mode " Pick") minor-mode-alist)) | ||
| 127 | (unless (assq 'gnus-pick-mode minor-mode-map-alist) | ||
| 128 | (push (cons 'gnus-pick-mode gnus-pick-mode-map) | ||
| 129 | minor-mode-map-alist)) | ||
| 130 | (run-hooks 'gnus-pick-mode-hook)))) | 136 | (run-hooks 'gnus-pick-mode-hook)))) |
| 131 | 137 | ||
| 132 | (defun gnus-pick-setup-message () | 138 | (defun gnus-pick-setup-message () |
| @@ -160,7 +166,7 @@ If given a prefix, mark all unpicked articles as read." | |||
| 160 | (if gnus-pick-elegant-flow | 166 | (if gnus-pick-elegant-flow |
| 161 | (progn | 167 | (progn |
| 162 | (when (or catch-up gnus-mark-unpicked-articles-as-read) | 168 | (when (or catch-up gnus-mark-unpicked-articles-as-read) |
| 163 | (gnus-summary-limit-mark-excluded-as-read)) | 169 | (gnus-summary-catchup nil t)) |
| 164 | (if (gnus-group-quit-config gnus-newsgroup-name) | 170 | (if (gnus-group-quit-config gnus-newsgroup-name) |
| 165 | (gnus-summary-exit) | 171 | (gnus-summary-exit) |
| 166 | (gnus-summary-next-group))) | 172 | (gnus-summary-next-group))) |
| @@ -329,11 +335,7 @@ This must be bound to a button-down mouse event." | |||
| 329 | ;; Set up the menu. | 335 | ;; Set up the menu. |
| 330 | (when (gnus-visual-p 'binary-menu 'menu) | 336 | (when (gnus-visual-p 'binary-menu 'menu) |
| 331 | (gnus-binary-make-menu-bar)) | 337 | (gnus-binary-make-menu-bar)) |
| 332 | (unless (assq 'gnus-binary-mode minor-mode-alist) | 338 | (gnus-add-minor-mode 'gnus-binary-mode " Binary" gnus-binary-mode-map) |
| 333 | (push '(gnus-binary-mode " Binary") minor-mode-alist)) | ||
| 334 | (unless (assq 'gnus-binary-mode minor-mode-map-alist) | ||
| 335 | (push (cons 'gnus-binary-mode gnus-binary-mode-map) | ||
| 336 | minor-mode-map-alist)) | ||
| 337 | (run-hooks 'gnus-binary-mode-hook)))) | 339 | (run-hooks 'gnus-binary-mode-hook)))) |
| 338 | 340 | ||
| 339 | (defun gnus-binary-display-article (article &optional all-header) | 341 | (defun gnus-binary-display-article (article &optional all-header) |
| @@ -352,16 +354,22 @@ This must be bound to a button-down mouse event." | |||
| 352 | ;;; gnus-tree-mode | 354 | ;;; gnus-tree-mode |
| 353 | ;;; | 355 | ;;; |
| 354 | 356 | ||
| 355 | (defvar gnus-tree-line-format "%(%[%3,3n%]%)" | 357 | (defcustom gnus-tree-line-format "%(%[%3,3n%]%)" |
| 356 | "Format of tree elements.") | 358 | "Format of tree elements." |
| 359 | :type 'string | ||
| 360 | :group 'gnus-summary-tree) | ||
| 357 | 361 | ||
| 358 | (defvar gnus-tree-minimize-window t | 362 | (defcustom gnus-tree-minimize-window t |
| 359 | "If non-nil, minimize the tree buffer window. | 363 | "If non-nil, minimize the tree buffer window. |
| 360 | If a number, never let the tree buffer grow taller than that number of | 364 | If a number, never let the tree buffer grow taller than that number of |
| 361 | lines.") | 365 | lines." |
| 366 | :type 'boolean | ||
| 367 | :group 'gnus-summary-tree) | ||
| 362 | 368 | ||
| 363 | (defvar gnus-selected-tree-face 'modeline | 369 | (defcustom gnus-selected-tree-face 'modeline |
| 364 | "*Face used for highlighting selected articles in the thread tree.") | 370 | "*Face used for highlighting selected articles in the thread tree." |
| 371 | :type 'face | ||
| 372 | :group 'gnus-summary-tree) | ||
| 365 | 373 | ||
| 366 | (defvar gnus-tree-brackets '((?\[ . ?\]) (?\( . ?\)) | 374 | (defvar gnus-tree-brackets '((?\[ . ?\]) (?\( . ?\)) |
| 367 | (?\{ . ?\}) (?< . ?>)) | 375 | (?\{ . ?\}) (?< . ?>)) |
| @@ -370,16 +378,24 @@ lines.") | |||
| 370 | (defvar gnus-tree-parent-child-edges '(?- ?\\ ?|) | 378 | (defvar gnus-tree-parent-child-edges '(?- ?\\ ?|) |
| 371 | "Characters used to connect parents with children.") | 379 | "Characters used to connect parents with children.") |
| 372 | 380 | ||
| 373 | (defvar gnus-tree-mode-line-format "Gnus: %%b %S %Z" | 381 | (defcustom gnus-tree-mode-line-format "Gnus: %%b %S %Z" |
| 374 | "*The format specification for the tree mode line.") | 382 | "*The format specification for the tree mode line." |
| 383 | :type 'string | ||
| 384 | :group 'gnus-summary-tree) | ||
| 375 | 385 | ||
| 376 | (defvar gnus-generate-tree-function 'gnus-generate-vertical-tree | 386 | (defcustom gnus-generate-tree-function 'gnus-generate-vertical-tree |
| 377 | "*Function for generating a thread tree. | 387 | "*Function for generating a thread tree. |
| 378 | Two predefined functions are available: | 388 | Two predefined functions are available: |
| 379 | `gnus-generate-horizontal-tree' and `gnus-generate-vertical-tree'.") | 389 | `gnus-generate-horizontal-tree' and `gnus-generate-vertical-tree'." |
| 390 | :type '(radio (function-item gnus-generate-vertical-tree) | ||
| 391 | (function-item gnus-generate-horizontal-tree) | ||
| 392 | (function :tag "Other" nil)) | ||
| 393 | :group 'gnus-summary-tree) | ||
| 380 | 394 | ||
| 381 | (defvar gnus-tree-mode-hook nil | 395 | (defcustom gnus-tree-mode-hook nil |
| 382 | "*Hook run in tree mode buffers.") | 396 | "*Hook run in tree mode buffers." |
| 397 | :type 'hook | ||
| 398 | :group 'gnus-summary-tree) | ||
| 383 | 399 | ||
| 384 | ;;; Internal variables. | 400 | ;;; Internal variables. |
| 385 | 401 | ||
| @@ -412,6 +428,7 @@ Two predefined functions are available: | |||
| 412 | "\r" gnus-tree-select-article | 428 | "\r" gnus-tree-select-article |
| 413 | gnus-mouse-2 gnus-tree-pick-article | 429 | gnus-mouse-2 gnus-tree-pick-article |
| 414 | "\C-?" gnus-tree-read-summary-keys | 430 | "\C-?" gnus-tree-read-summary-keys |
| 431 | "h" gnus-tree-show-summary | ||
| 415 | 432 | ||
| 416 | "\C-c\C-i" gnus-info-find-node) | 433 | "\C-c\C-i" gnus-info-find-node) |
| 417 | 434 | ||
| @@ -462,6 +479,14 @@ Two predefined functions are available: | |||
| 462 | (goto-char (or (gnus-overlay-end gnus-selected-tree-overlay) 1))) | 479 | (goto-char (or (gnus-overlay-end gnus-selected-tree-overlay) 1))) |
| 463 | (gnus-tree-minimize)))) | 480 | (gnus-tree-minimize)))) |
| 464 | 481 | ||
| 482 | (defun gnus-tree-show-summary () | ||
| 483 | "Reconfigure windows to show summary buffer." | ||
| 484 | (interactive) | ||
| 485 | (if (not (gnus-buffer-live-p gnus-summary-buffer)) | ||
| 486 | (error "There is no summary buffer for this tree buffer") | ||
| 487 | (gnus-configure-windows 'article) | ||
| 488 | (gnus-summary-goto-subject gnus-current-article))) | ||
| 489 | |||
| 465 | (defun gnus-tree-select-article (article) | 490 | (defun gnus-tree-select-article (article) |
| 466 | "Select the article under point, if any." | 491 | "Select the article under point, if any." |
| 467 | (interactive (list (gnus-tree-article-number))) | 492 | (interactive (list (gnus-tree-article-number))) |
| @@ -648,7 +673,9 @@ Two predefined functions are available: | |||
| 648 | "Generate a horizontal tree." | 673 | "Generate a horizontal tree." |
| 649 | (let* ((dummy (stringp (car thread))) | 674 | (let* ((dummy (stringp (car thread))) |
| 650 | (do (or dummy | 675 | (do (or dummy |
| 651 | (memq (mail-header-number (car thread)) gnus-tmp-limit))) | 676 | (and (car thread) |
| 677 | (memq (mail-header-number (car thread)) | ||
| 678 | gnus-tmp-limit)))) | ||
| 652 | col beg) | 679 | col beg) |
| 653 | (if (not do) | 680 | (if (not do) |
| 654 | ;; We don't want this article. | 681 | ;; We don't want this article. |
| @@ -720,13 +747,12 @@ Two predefined functions are available: | |||
| 720 | (delete-char -1) | 747 | (delete-char -1) |
| 721 | (insert (cadr gnus-tree-parent-child-edges)) | 748 | (insert (cadr gnus-tree-parent-child-edges)) |
| 722 | (setq beg (point)) | 749 | (setq beg (point)) |
| 750 | (forward-char -1) | ||
| 723 | ;; Draw "-" lines leftwards. | 751 | ;; Draw "-" lines leftwards. |
| 724 | (while (progn | 752 | (while (= (char-after (1- (point))) ? ) |
| 725 | (unless (bolp) | 753 | (delete-char -1) |
| 726 | (forward-char -2)) | 754 | (insert (car gnus-tree-parent-child-edges)) |
| 727 | (= (following-char) ? )) | 755 | (forward-char -1)) |
| 728 | (delete-char 1) | ||
| 729 | (insert (car gnus-tree-parent-child-edges))) | ||
| 730 | (goto-char beg) | 756 | (goto-char beg) |
| 731 | (gnus-tree-forward-line 1))) | 757 | (gnus-tree-forward-line 1))) |
| 732 | (setq dummyp nil) | 758 | (setq dummyp nil) |
| @@ -926,7 +952,7 @@ The following commands are available: | |||
| 926 | \\{gnus-carpal-mode-map}" | 952 | \\{gnus-carpal-mode-map}" |
| 927 | (interactive) | 953 | (interactive) |
| 928 | (kill-all-local-variables) | 954 | (kill-all-local-variables) |
| 929 | (setq mode-line-modified "-- ") | 955 | (setq mode-line-modified (cdr gnus-mode-line-modified)) |
| 930 | (setq major-mode 'gnus-carpal-mode) | 956 | (setq major-mode 'gnus-carpal-mode) |
| 931 | (setq mode-name "Gnus Carpal") | 957 | (setq mode-name "Gnus Carpal") |
| 932 | (setq mode-line-process nil) | 958 | (setq mode-line-process nil) |
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index ae381cd106f..8485f7639fe 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; gnus-score.el --- scoring code for Gnus | 1 | 1;;; gnus-score.el --- scoring code for Gnus |
| 2 | ;; Copyright (C) 1995,96,97 Free Software Foundation, Inc. | 2 | ;; Copyright (C) 1995,96,97 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | ;; Author: Per Abrahamsen <amanda@iesd.auc.dk> | 4 | ;; Author: Per Abrahamsen <amanda@iesd.auc.dk> |
| @@ -31,6 +31,7 @@ | |||
| 31 | (require 'gnus) | 31 | (require 'gnus) |
| 32 | (require 'gnus-sum) | 32 | (require 'gnus-sum) |
| 33 | (require 'gnus-range) | 33 | (require 'gnus-range) |
| 34 | (require 'message) | ||
| 34 | 35 | ||
| 35 | (defcustom gnus-global-score-files nil | 36 | (defcustom gnus-global-score-files nil |
| 36 | "List of global score files and directories. | 37 | "List of global score files and directories. |
| @@ -528,7 +529,8 @@ used as score." | |||
| 528 | 529 | ||
| 529 | (gnus-score-kill-help-buffer) | 530 | (gnus-score-kill-help-buffer) |
| 530 | (unless (setq entry (assq (downcase hchar) char-to-header)) | 531 | (unless (setq entry (assq (downcase hchar) char-to-header)) |
| 531 | (if mimic (error "%c %c" prefix hchar) (error ""))) | 532 | (if mimic (error "%c %c" prefix hchar) |
| 533 | (error "Illegal header type"))) | ||
| 532 | 534 | ||
| 533 | (when (/= (downcase hchar) hchar) | 535 | (when (/= (downcase hchar) hchar) |
| 534 | ;; This was a majuscule, so we end reading and set the defaults. | 536 | ;; This was a majuscule, so we end reading and set the defaults. |
| @@ -536,36 +538,32 @@ used as score." | |||
| 536 | (setq tchar (or tchar ?s) | 538 | (setq tchar (or tchar ?s) |
| 537 | pchar (or pchar ?t))) | 539 | pchar (or pchar ?t))) |
| 538 | 540 | ||
| 539 | ;; We continue reading - the type. | 541 | (let ((legal-types |
| 540 | (while (not tchar) | 542 | (delq nil |
| 541 | (if mimic | 543 | (mapcar (lambda (s) |
| 542 | (progn | 544 | (if (eq (nth 4 entry) |
| 543 | (sit-for 1) (message "%c %c-" prefix hchar)) | 545 | (nth 3 s)) |
| 544 | (message "%s header '%s' with match type (%s?): " | 546 | s nil)) |
| 545 | (if increase "Increase" "Lower") | 547 | char-to-type)))) |
| 546 | (nth 1 entry) | 548 | ;; We continue reading - the type. |
| 547 | (mapconcat (lambda (s) | 549 | (while (not tchar) |
| 548 | (if (eq (nth 4 entry) | 550 | (if mimic |
| 549 | (nth 3 s)) | 551 | (progn |
| 550 | (char-to-string (car s)) | 552 | (sit-for 1) (message "%c %c-" prefix hchar)) |
| 551 | "")) | 553 | (message "%s header '%s' with match type (%s?): " |
| 552 | char-to-type ""))) | 554 | (if increase "Increase" "Lower") |
| 553 | (setq tchar (read-char)) | 555 | (nth 1 entry) |
| 554 | (when (or (= tchar ??) (= tchar ?\C-h)) | 556 | (mapconcat (lambda (s) (char-to-string (car s))) |
| 555 | (setq tchar nil) | 557 | legal-types ""))) |
| 556 | (gnus-score-insert-help | 558 | (setq tchar (read-char)) |
| 557 | "Match type" | 559 | (when (or (= tchar ??) (= tchar ?\C-h)) |
| 558 | (delq nil | 560 | (setq tchar nil) |
| 559 | (mapcar (lambda (s) | 561 | (gnus-score-insert-help "Match type" legal-types 2))) |
| 560 | (if (eq (nth 4 entry) | 562 | |
| 561 | (nth 3 s)) | 563 | (gnus-score-kill-help-buffer) |
| 562 | s nil)) | 564 | (unless (setq type (nth 1 (assq (downcase tchar) legal-types))) |
| 563 | char-to-type)) | 565 | (if mimic (error "%c %c" prefix hchar) |
| 564 | 2))) | 566 | (error "Illegal match type")))) |
| 565 | |||
| 566 | (gnus-score-kill-help-buffer) | ||
| 567 | (unless (setq type (nth 1 (assq (downcase tchar) char-to-type))) | ||
| 568 | (if mimic (error "%c %c" prefix hchar) (error ""))) | ||
| 569 | 567 | ||
| 570 | (when (/= (downcase tchar) tchar) | 568 | (when (/= (downcase tchar) tchar) |
| 571 | ;; It was a majuscule, so we end reading and use the default. | 569 | ;; It was a majuscule, so we end reading and use the default. |
| @@ -598,7 +596,7 @@ used as score." | |||
| 598 | (error "You rang?")) | 596 | (error "You rang?")) |
| 599 | (if mimic | 597 | (if mimic |
| 600 | (error "%c %c %c %c" prefix hchar tchar pchar) | 598 | (error "%c %c %c %c" prefix hchar tchar pchar) |
| 601 | (error "")))) | 599 | (error "Illegal match duration")))) |
| 602 | ;; Always kill the score help buffer. | 600 | ;; Always kill the score help buffer. |
| 603 | (gnus-score-kill-help-buffer)) | 601 | (gnus-score-kill-help-buffer)) |
| 604 | 602 | ||
| @@ -1005,6 +1003,7 @@ SCORE is the score to add." | |||
| 1005 | (gnus-make-directory (file-name-directory file)) | 1003 | (gnus-make-directory (file-name-directory file)) |
| 1006 | (setq gnus-score-edit-buffer (find-file-noselect file)) | 1004 | (setq gnus-score-edit-buffer (find-file-noselect file)) |
| 1007 | (gnus-configure-windows 'edit-score) | 1005 | (gnus-configure-windows 'edit-score) |
| 1006 | (select-window (get-buffer-window gnus-score-edit-buffer)) | ||
| 1008 | (gnus-score-mode) | 1007 | (gnus-score-mode) |
| 1009 | (setq gnus-score-edit-exit-function 'gnus-score-edit-done) | 1008 | (setq gnus-score-edit-exit-function 'gnus-score-edit-done) |
| 1010 | (make-local-variable 'gnus-prev-winconf) | 1009 | (make-local-variable 'gnus-prev-winconf) |
| @@ -1086,11 +1085,11 @@ SCORE is the score to add." | |||
| 1086 | (decay (car (gnus-score-get 'decay alist))) | 1085 | (decay (car (gnus-score-get 'decay alist))) |
| 1087 | (eval (car (gnus-score-get 'eval alist)))) | 1086 | (eval (car (gnus-score-get 'eval alist)))) |
| 1088 | ;; Perform possible decays. | 1087 | ;; Perform possible decays. |
| 1089 | (when (and gnus-decay-scores | 1088 | (when gnus-decay-scores |
| 1090 | (gnus-decay-scores | 1089 | (when (or (not decay) |
| 1091 | alist (or decay (gnus-time-to-day (current-time))))) | 1090 | (gnus-decay-scores alist decay)) |
| 1092 | (gnus-score-set 'touched '(t) alist) | 1091 | (gnus-score-set 'touched '(t) alist) |
| 1093 | (gnus-score-set 'decay (list (gnus-time-to-day (current-time))))) | 1092 | (gnus-score-set 'decay (list (gnus-time-to-day (current-time)))))) |
| 1094 | ;; We do not respect eval and files atoms from global score | 1093 | ;; We do not respect eval and files atoms from global score |
| 1095 | ;; files. | 1094 | ;; files. |
| 1096 | (and files (not global) | 1095 | (and files (not global) |
| @@ -1280,8 +1279,7 @@ SCORE is the score to add." | |||
| 1280 | (erase-buffer) | 1279 | (erase-buffer) |
| 1281 | (let (emacs-lisp-mode-hook) | 1280 | (let (emacs-lisp-mode-hook) |
| 1282 | (if (string-match | 1281 | (if (string-match |
| 1283 | (concat (regexp-quote gnus-adaptive-file-suffix) | 1282 | (concat (regexp-quote gnus-adaptive-file-suffix) "$") |
| 1284 | "$") | ||
| 1285 | file) | 1283 | file) |
| 1286 | ;; This is an adaptive score file, so we do not run | 1284 | ;; This is an adaptive score file, so we do not run |
| 1287 | ;; it through `pp'. These files can get huge, and | 1285 | ;; it through `pp'. These files can get huge, and |
| @@ -1364,6 +1362,7 @@ SCORE is the score to add." | |||
| 1364 | (save-excursion | 1362 | (save-excursion |
| 1365 | (set-buffer (get-buffer-create "*Headers*")) | 1363 | (set-buffer (get-buffer-create "*Headers*")) |
| 1366 | (buffer-disable-undo (current-buffer)) | 1364 | (buffer-disable-undo (current-buffer)) |
| 1365 | (message-clone-locals gnus-summary-buffer) | ||
| 1367 | 1366 | ||
| 1368 | ;; Set the global variant of this variable. | 1367 | ;; Set the global variant of this variable. |
| 1369 | (setq gnus-current-score-file current-score-file) | 1368 | (setq gnus-current-score-file current-score-file) |
| @@ -2201,7 +2200,9 @@ SCORE is the score to add." | |||
| 2201 | (gnus-add-current-to-buffer-list) | 2200 | (gnus-add-current-to-buffer-list) |
| 2202 | (while trace | 2201 | (while trace |
| 2203 | (insert (format "%S -> %s\n" (cdar trace) | 2202 | (insert (format "%S -> %s\n" (cdar trace) |
| 2204 | (file-name-nondirectory (caar trace)))) | 2203 | (if (caar trace) |
| 2204 | (file-name-nondirectory (caar trace)) | ||
| 2205 | "(non-file rule)"))) | ||
| 2205 | (setq trace (cdr trace))) | 2206 | (setq trace (cdr trace))) |
| 2206 | (goto-char (point-min)) | 2207 | (goto-char (point-min)) |
| 2207 | (gnus-configure-windows 'score-trace))) | 2208 | (gnus-configure-windows 'score-trace))) |
| @@ -2457,8 +2458,8 @@ GROUP using BNews sys file syntax." | |||
| 2457 | (if (looking-at "not.") | 2458 | (if (looking-at "not.") |
| 2458 | (progn | 2459 | (progn |
| 2459 | (setq not-match t) | 2460 | (setq not-match t) |
| 2460 | (setq regexp (concat "^" (buffer-substring 5 (point-max))))) | 2461 | (setq regexp (concat "^" (buffer-substring 5 (point-max)) "$"))) |
| 2461 | (setq regexp (concat "^" (buffer-substring 1 (point-max)))) | 2462 | (setq regexp (concat "^" (buffer-substring 1 (point-max)) "$")) |
| 2462 | (setq not-match nil)) | 2463 | (setq not-match nil)) |
| 2463 | ;; Finally - if this resulting regexp matches the group name, | 2464 | ;; Finally - if this resulting regexp matches the group name, |
| 2464 | ;; we add this score file to the list of score files | 2465 | ;; we add this score file to the list of score files |
| @@ -2730,11 +2731,11 @@ If ADAPT, return the home adaptive file instead." | |||
| 2730 | ;;; | 2731 | ;;; |
| 2731 | 2732 | ||
| 2732 | (defun gnus-decay-score (score) | 2733 | (defun gnus-decay-score (score) |
| 2733 | "Decay SCORE." | 2734 | "Decay SCORE according to `gnus-score-decay-constant' and `gnus-score-decay-scale'." |
| 2734 | (floor | 2735 | (floor |
| 2735 | (- score | 2736 | (- score |
| 2736 | (* (if (< score 0) 1 -1) | 2737 | (* (if (< score 0) -1 1) |
| 2737 | (min score | 2738 | (min (abs score) |
| 2738 | (max gnus-score-decay-constant | 2739 | (max gnus-score-decay-constant |
| 2739 | (* (abs score) | 2740 | (* (abs score) |
| 2740 | gnus-score-decay-scale))))))) | 2741 | gnus-score-decay-scale))))))) |
| @@ -2750,11 +2751,13 @@ If ADAPT, return the home adaptive file instead." | |||
| 2750 | (while (setq kill (pop entry)) | 2751 | (while (setq kill (pop entry)) |
| 2751 | (when (nth 2 kill) | 2752 | (when (nth 2 kill) |
| 2752 | (setq updated t) | 2753 | (setq updated t) |
| 2753 | (setq score (or (car kill) gnus-score-interactive-default-score) | 2754 | (setq score (or (nth 1 kill) |
| 2755 | gnus-score-interactive-default-score) | ||
| 2754 | n times) | 2756 | n times) |
| 2755 | (while (natnump (decf n)) | 2757 | (while (natnump (decf n)) |
| 2756 | (setq score (funcall gnus-decay-score-function score))) | 2758 | (setq score (funcall gnus-decay-score-function score))) |
| 2757 | (setcar kill score)))))) | 2759 | (setcdr kill (cons score |
| 2760 | (cdr (cdr kill))))))))) | ||
| 2758 | ;; Return whether this score file needs to be saved. By Je-haysuss! | 2761 | ;; Return whether this score file needs to be saved. By Je-haysuss! |
| 2759 | updated)) | 2762 | updated)) |
| 2760 | 2763 | ||
diff --git a/lisp/gnus/gnus-soup.el b/lisp/gnus/gnus-soup.el index b41b458b265..2143f9dc437 100644 --- a/lisp/gnus/gnus-soup.el +++ b/lisp/gnus/gnus-soup.el | |||
| @@ -358,7 +358,7 @@ If NOT-ALL, don't pack ticked articles." | |||
| 358 | (call-process shell-file-name nil nil nil shell-command-switch | 358 | (call-process shell-file-name nil nil nil shell-command-switch |
| 359 | (concat "cd " dir " ; rm " files)) | 359 | (concat "cd " dir " ; rm " files)) |
| 360 | (gnus-message 4 "Packing...done" packer)) | 360 | (gnus-message 4 "Packing...done" packer)) |
| 361 | (error "Couldn't pack packet.")))) | 361 | (error "Couldn't pack packet")))) |
| 362 | 362 | ||
| 363 | (defun gnus-soup-parse-areas (file) | 363 | (defun gnus-soup-parse-areas (file) |
| 364 | "Parse soup area file FILE. | 364 | "Parse soup area file FILE. |
| @@ -523,7 +523,7 @@ Return whether the unpacking was successful." | |||
| 523 | (goto-char (point-min)) | 523 | (goto-char (point-min)) |
| 524 | (while (not (eobp)) | 524 | (while (not (eobp)) |
| 525 | (unless (looking-at "#! *rnews +\\([0-9]+\\)") | 525 | (unless (looking-at "#! *rnews +\\([0-9]+\\)") |
| 526 | (error "Bad header.")) | 526 | (error "Bad header")) |
| 527 | (forward-line 1) | 527 | (forward-line 1) |
| 528 | (setq beg (point) | 528 | (setq beg (point) |
| 529 | end (+ (point) (string-to-int | 529 | end (+ (point) (string-to-int |
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index d953bebc470..05fb4ae18a0 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el | |||
| @@ -505,6 +505,7 @@ The following commands are available: | |||
| 505 | "n" gnus-browse-next-group | 505 | "n" gnus-browse-next-group |
| 506 | "p" gnus-browse-prev-group | 506 | "p" gnus-browse-prev-group |
| 507 | "\177" gnus-browse-prev-group | 507 | "\177" gnus-browse-prev-group |
| 508 | [delete] gnus-browse-prev-group | ||
| 508 | "N" gnus-browse-next-group | 509 | "N" gnus-browse-next-group |
| 509 | "P" gnus-browse-prev-group | 510 | "P" gnus-browse-prev-group |
| 510 | "\M-n" gnus-browse-next-group | 511 | "\M-n" gnus-browse-next-group |
| @@ -552,7 +553,8 @@ The following commands are available: | |||
| 552 | (cond | 553 | (cond |
| 553 | ((not (gnus-check-server method)) | 554 | ((not (gnus-check-server method)) |
| 554 | (gnus-message | 555 | (gnus-message |
| 555 | 1 "Unable to contact server: %s" (gnus-status-message method)) | 556 | 1 "Unable to contact server %s: %s" (nth 1 method) |
| 557 | (gnus-status-message method)) | ||
| 556 | nil) | 558 | nil) |
| 557 | ((not | 559 | ((not |
| 558 | (prog2 | 560 | (prog2 |
| @@ -663,7 +665,7 @@ buffer. | |||
| 663 | "(Un)subscribe to the next ARG groups." | 665 | "(Un)subscribe to the next ARG groups." |
| 664 | (interactive "p") | 666 | (interactive "p") |
| 665 | (when (eobp) | 667 | (when (eobp) |
| 666 | (error "No group at current line.")) | 668 | (error "No group at current line")) |
| 667 | (let ((ward (if (< arg 0) -1 1)) | 669 | (let ((ward (if (< arg 0) -1 1)) |
| 668 | (arg (abs arg))) | 670 | (arg (abs arg))) |
| 669 | (while (and (> arg 0) | 671 | (while (and (> arg 0) |
| @@ -695,7 +697,9 @@ buffer. | |||
| 695 | ;; If this group it killed, then we want to subscribe it. | 697 | ;; If this group it killed, then we want to subscribe it. |
| 696 | (when (= (following-char) ?K) | 698 | (when (= (following-char) ?K) |
| 697 | (setq sub t)) | 699 | (setq sub t)) |
| 698 | (setq group (gnus-browse-group-name)) | 700 | (when (gnus-gethash (setq group (gnus-browse-group-name)) |
| 701 | gnus-newsrc-hashtb) | ||
| 702 | (error "Group already subscribed")) | ||
| 699 | ;; Make sure the group has been properly removed before we | 703 | ;; Make sure the group has been properly removed before we |
| 700 | ;; subscribe to it. | 704 | ;; subscribe to it. |
| 701 | (gnus-kill-ephemeral-group group) | 705 | (gnus-kill-ephemeral-group group) |
| @@ -745,6 +749,8 @@ buffer. | |||
| 745 | 'request-regenerate (car (gnus-server-to-method server)))) | 749 | 'request-regenerate (car (gnus-server-to-method server)))) |
| 746 | (error "This backend doesn't support regeneration") | 750 | (error "This backend doesn't support regeneration") |
| 747 | (gnus-message 5 "Requesting regeneration of %s..." server) | 751 | (gnus-message 5 "Requesting regeneration of %s..." server) |
| 752 | (unless (gnus-open-server server) | ||
| 753 | (error "Couldn't open server")) | ||
| 748 | (if (gnus-request-regenerate server) | 754 | (if (gnus-request-regenerate server) |
| 749 | (gnus-message 5 "Requesting regeneration of %s...done" server) | 755 | (gnus-message 5 "Requesting regeneration of %s...done" server) |
| 750 | (gnus-message 5 "Couldn't regenerate %s" server))))) | 756 | (gnus-message 5 "Couldn't regenerate %s" server))))) |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 95413550e5e..ad4a437371e 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -79,7 +79,7 @@ saved will be used." | |||
| 79 | :group 'gnus-dribble-file | 79 | :group 'gnus-dribble-file |
| 80 | :type '(choice directory (const nil))) | 80 | :type '(choice directory (const nil))) |
| 81 | 81 | ||
| 82 | (defcustom gnus-check-new-newsgroups t | 82 | (defcustom gnus-check-new-newsgroups 'ask-server |
| 83 | "*Non-nil means that Gnus will run gnus-find-new-newsgroups at startup. | 83 | "*Non-nil means that Gnus will run gnus-find-new-newsgroups at startup. |
| 84 | This normally finds new newsgroups by comparing the active groups the | 84 | This normally finds new newsgroups by comparing the active groups the |
| 85 | servers have already reported with those Gnus already knows, either alive | 85 | servers have already reported with those Gnus already knows, either alive |
| @@ -123,7 +123,7 @@ check for bogus newsgroups with \\<gnus-group-mode-map>\\[gnus-group-check-bogus | |||
| 123 | :group 'gnus-start-server | 123 | :group 'gnus-start-server |
| 124 | :type 'boolean) | 124 | :type 'boolean) |
| 125 | 125 | ||
| 126 | (defcustom gnus-read-active-file t | 126 | (defcustom gnus-read-active-file 'some |
| 127 | "*Non-nil means that Gnus will read the entire active file at startup. | 127 | "*Non-nil means that Gnus will read the entire active file at startup. |
| 128 | If this variable is nil, Gnus will only know about the groups in your | 128 | If this variable is nil, Gnus will only know about the groups in your |
| 129 | `.newsrc' file. | 129 | `.newsrc' file. |
| @@ -643,8 +643,8 @@ prompt the user for the name of an NNTP server to use." | |||
| 643 | (gnus-splash) | 643 | (gnus-splash) |
| 644 | (gnus-clear-system) | 644 | (gnus-clear-system) |
| 645 | (nnheader-init-server-buffer) | 645 | (nnheader-init-server-buffer) |
| 646 | (gnus-read-init-file) | ||
| 647 | (setq gnus-slave slave) | 646 | (setq gnus-slave slave) |
| 647 | (gnus-read-init-file) | ||
| 648 | 648 | ||
| 649 | (when (and (string-match "XEmacs" (emacs-version)) | 649 | (when (and (string-match "XEmacs" (emacs-version)) |
| 650 | gnus-simple-splash) | 650 | gnus-simple-splash) |
| @@ -691,7 +691,7 @@ prompt the user for the name of an NNTP server to use." | |||
| 691 | "Unload all Gnus features." | 691 | "Unload all Gnus features." |
| 692 | (interactive) | 692 | (interactive) |
| 693 | (unless (boundp 'load-history) | 693 | (unless (boundp 'load-history) |
| 694 | (error "Sorry, `gnus-unload' is not implemented in this Emacs version.")) | 694 | (error "Sorry, `gnus-unload' is not implemented in this Emacs version")) |
| 695 | (let ((history load-history) | 695 | (let ((history load-history) |
| 696 | feature) | 696 | feature) |
| 697 | (while history | 697 | (while history |
| @@ -762,6 +762,7 @@ prompt the user for the name of an NNTP server to use." | |||
| 762 | ;; Set the file modes to reflect the .newsrc file modes. | 762 | ;; Set the file modes to reflect the .newsrc file modes. |
| 763 | (save-buffer) | 763 | (save-buffer) |
| 764 | (when (and (file-exists-p gnus-current-startup-file) | 764 | (when (and (file-exists-p gnus-current-startup-file) |
| 765 | (file-exists-p dribble-file) | ||
| 765 | (setq modes (file-modes gnus-current-startup-file))) | 766 | (setq modes (file-modes gnus-current-startup-file))) |
| 766 | (set-file-modes dribble-file modes)) | 767 | (set-file-modes dribble-file modes)) |
| 767 | ;; Possibly eval the file later. | 768 | ;; Possibly eval the file later. |
| @@ -839,7 +840,7 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." | |||
| 839 | ;; done in `gnus-get-unread-articles'. | 840 | ;; done in `gnus-get-unread-articles'. |
| 840 | (and gnus-read-active-file | 841 | (and gnus-read-active-file |
| 841 | (not level) | 842 | (not level) |
| 842 | (gnus-read-active-file)) | 843 | (gnus-read-active-file nil dont-connect)) |
| 843 | 844 | ||
| 844 | (unless gnus-active-hashtb | 845 | (unless gnus-active-hashtb |
| 845 | (setq gnus-active-hashtb (gnus-make-hashtable 4096))) | 846 | (setq gnus-active-hashtb (gnus-make-hashtable 4096))) |
| @@ -861,7 +862,8 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." | |||
| 861 | 862 | ||
| 862 | ;; See whether we need to read the description file. | 863 | ;; See whether we need to read the description file. |
| 863 | (when (and (boundp 'gnus-group-line-format) | 864 | (when (and (boundp 'gnus-group-line-format) |
| 864 | (string-match "%[-,0-9]*D" gnus-group-line-format) | 865 | (let ((case-fold-search nil)) |
| 866 | (string-match "%[-,0-9]*D" gnus-group-line-format)) | ||
| 865 | (not gnus-description-hashtb) | 867 | (not gnus-description-hashtb) |
| 866 | (not dont-connect) | 868 | (not dont-connect) |
| 867 | gnus-read-active-file) | 869 | gnus-read-active-file) |
| @@ -895,8 +897,8 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." | |||
| 895 | "Search for new newsgroups and add them. | 897 | "Search for new newsgroups and add them. |
| 896 | Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method.' | 898 | Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method.' |
| 897 | The `-n' option line from .newsrc is respected. | 899 | The `-n' option line from .newsrc is respected. |
| 898 | If ARG (the prefix), use the `ask-server' method to query | 900 | If ARG (the prefix), use the `ask-server' method to query the server |
| 899 | the server for new groups." | 901 | for new groups." |
| 900 | (interactive "P") | 902 | (interactive "P") |
| 901 | (let ((check (if (or (and arg (not (listp gnus-check-new-newsgroups))) | 903 | (let ((check (if (or (and arg (not (listp gnus-check-new-newsgroups))) |
| 902 | (null gnus-read-active-file) | 904 | (null gnus-read-active-file) |
| @@ -1050,7 +1052,8 @@ the server for new groups." | |||
| 1050 | nil | 1052 | nil |
| 1051 | (gnus-message 6 "First time user; subscribing you to default groups") | 1053 | (gnus-message 6 "First time user; subscribing you to default groups") |
| 1052 | (unless (gnus-read-active-file-p) | 1054 | (unless (gnus-read-active-file-p) |
| 1053 | (gnus-read-active-file)) | 1055 | (let ((gnus-read-active-file t)) |
| 1056 | (gnus-read-active-file))) | ||
| 1054 | (setq gnus-newsrc-last-checked-date (current-time-string)) | 1057 | (setq gnus-newsrc-last-checked-date (current-time-string)) |
| 1055 | (let ((groups gnus-default-subscribed-newsgroups) | 1058 | (let ((groups gnus-default-subscribed-newsgroups) |
| 1056 | group) | 1059 | group) |
| @@ -1209,7 +1212,8 @@ the server for new groups." | |||
| 1209 | (format | 1212 | (format |
| 1210 | "(gnus-group-set-info '%S)" info))))) | 1213 | "(gnus-group-set-info '%S)" info))))) |
| 1211 | (when gnus-group-change-level-function | 1214 | (when gnus-group-change-level-function |
| 1212 | (funcall gnus-group-change-level-function group level oldlevel))))) | 1215 | (funcall gnus-group-change-level-function |
| 1216 | group level oldlevel previous))))) | ||
| 1213 | 1217 | ||
| 1214 | (defun gnus-kill-newsgroup (newsgroup) | 1218 | (defun gnus-kill-newsgroup (newsgroup) |
| 1215 | "Obsolete function. Kills a newsgroup." | 1219 | "Obsolete function. Kills a newsgroup." |
| @@ -1282,12 +1286,11 @@ newsgroup." | |||
| 1282 | "Alter the ACTIVE info for GROUP to reflect the articles in the cache." | 1286 | "Alter the ACTIVE info for GROUP to reflect the articles in the cache." |
| 1283 | (when gnus-cache-active-hashtb | 1287 | (when gnus-cache-active-hashtb |
| 1284 | (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) | 1288 | (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) |
| 1285 | (and cache-active | 1289 | (when cache-active |
| 1286 | (< (car cache-active) (car active)) | 1290 | (when (< (car cache-active) (car active)) |
| 1287 | (setcar active (car cache-active))) | 1291 | (setcar active (car cache-active))) |
| 1288 | (and cache-active | 1292 | (when (> (cdr cache-active) (cdr active)) |
| 1289 | (> (cdr cache-active) (cdr active)) | 1293 | (setcdr active (cdr cache-active)))))))) |
| 1290 | (setcdr active (cdr cache-active))))))) | ||
| 1291 | 1294 | ||
| 1292 | (defun gnus-activate-group (group &optional scan dont-check method) | 1295 | (defun gnus-activate-group (group &optional scan dont-check method) |
| 1293 | ;; Check whether a group has been activated or not. | 1296 | ;; Check whether a group has been activated or not. |
| @@ -1307,9 +1310,18 @@ newsgroup." | |||
| 1307 | (inline (gnus-request-group group dont-check method)) | 1310 | (inline (gnus-request-group group dont-check method)) |
| 1308 | (error nil) | 1311 | (error nil) |
| 1309 | (quit nil)) | 1312 | (quit nil)) |
| 1310 | (gnus-set-active group (setq active (gnus-parse-active))) | 1313 | (setq active (gnus-parse-active)) |
| 1311 | ;; Return the new active info. | 1314 | ;; If there are no articles in the group, the GROUP |
| 1312 | active))) | 1315 | ;; command may have responded with the `(0 . 0)'. We |
| 1316 | ;; ignore this if we already have an active entry | ||
| 1317 | ;; for the group. | ||
| 1318 | (if (and (zerop (car active)) | ||
| 1319 | (zerop (cdr active)) | ||
| 1320 | (gnus-active group)) | ||
| 1321 | (gnus-active group) | ||
| 1322 | (gnus-set-active group active) | ||
| 1323 | ;; Return the new active info. | ||
| 1324 | active)))) | ||
| 1313 | 1325 | ||
| 1314 | (defun gnus-get-unread-articles-in-group (info active &optional update) | 1326 | (defun gnus-get-unread-articles-in-group (info active &optional update) |
| 1315 | (when active | 1327 | (when active |
| @@ -1552,11 +1564,12 @@ newsgroup." | |||
| 1552 | (gnus-dribble-touch)) | 1564 | (gnus-dribble-touch)) |
| 1553 | 1565 | ||
| 1554 | ;; Get the active file(s) from the backend(s). | 1566 | ;; Get the active file(s) from the backend(s). |
| 1555 | (defun gnus-read-active-file (&optional force) | 1567 | (defun gnus-read-active-file (&optional force not-native) |
| 1556 | (gnus-group-set-mode-line) | 1568 | (gnus-group-set-mode-line) |
| 1557 | (let ((methods | 1569 | (let ((methods |
| 1558 | (append | 1570 | (append |
| 1559 | (if (gnus-check-server gnus-select-method) | 1571 | (if (and (not not-native) |
| 1572 | (gnus-check-server gnus-select-method)) | ||
| 1560 | ;; The native server is available. | 1573 | ;; The native server is available. |
| 1561 | (cons gnus-select-method gnus-secondary-select-methods) | 1574 | (cons gnus-select-method gnus-secondary-select-methods) |
| 1562 | ;; The native server is down, so we just do the | 1575 | ;; The native server is down, so we just do the |
| @@ -1616,7 +1629,7 @@ newsgroup." | |||
| 1616 | (t | 1629 | (t |
| 1617 | (if (not (gnus-request-list method)) | 1630 | (if (not (gnus-request-list method)) |
| 1618 | (unless (equal method gnus-message-archive-method) | 1631 | (unless (equal method gnus-message-archive-method) |
| 1619 | (gnus-error 1 "Cannot read active file from %s server." | 1632 | (gnus-error 1 "Cannot read active file from %s server" |
| 1620 | (car method))) | 1633 | (car method))) |
| 1621 | (gnus-message 5 mesg) | 1634 | (gnus-message 5 mesg) |
| 1622 | (gnus-active-to-gnus-format method gnus-active-hashtb) | 1635 | (gnus-active-to-gnus-format method gnus-active-hashtb) |
| @@ -1647,7 +1660,7 @@ newsgroup." | |||
| 1647 | (gnus-make-hashtable | 1660 | (gnus-make-hashtable |
| 1648 | (count-lines (point-min) (point-max))) | 1661 | (count-lines (point-min) (point-max))) |
| 1649 | (gnus-make-hashtable 4096))))))) | 1662 | (gnus-make-hashtable 4096))))))) |
| 1650 | ;; Delete unnecessary lines, cleaned up dmoore@ucsd.edu 31.10.1996 | 1663 | ;; Delete unnecessary lines. |
| 1651 | (goto-char (point-min)) | 1664 | (goto-char (point-min)) |
| 1652 | (cond ((gnus-ignored-newsgroups-has-to-p) | 1665 | (cond ((gnus-ignored-newsgroups-has-to-p) |
| 1653 | (delete-matching-lines gnus-ignored-newsgroups)) | 1666 | (delete-matching-lines gnus-ignored-newsgroups)) |
| @@ -1659,21 +1672,20 @@ newsgroup." | |||
| 1659 | 1672 | ||
| 1660 | ;; Make the group names readable as a lisp expression even if they | 1673 | ;; Make the group names readable as a lisp expression even if they |
| 1661 | ;; contain special characters. | 1674 | ;; contain special characters. |
| 1662 | ;; Fix by Luc Van Eycken <Luc.VanEycken@esat.kuleuven.ac.be>. | ||
| 1663 | (goto-char (point-max)) | 1675 | (goto-char (point-max)) |
| 1664 | (while (re-search-backward "[][';?()#]" nil t) | 1676 | (while (re-search-backward "[][';?()#]" nil t) |
| 1665 | (insert ?\\)) | 1677 | (insert ?\\)) |
| 1666 | 1678 | ||
| 1667 | ;; If these are groups from a foreign select method, we insert the | 1679 | ;; If these are groups from a foreign select method, we insert the |
| 1668 | ;; group prefix in front of the group names. | 1680 | ;; group prefix in front of the group names. |
| 1669 | (and method (not (gnus-server-equal | 1681 | (when (not (gnus-server-equal |
| 1670 | (gnus-server-get-method nil method) | 1682 | (gnus-server-get-method nil method) |
| 1671 | (gnus-server-get-method nil gnus-select-method))) | 1683 | (gnus-server-get-method nil gnus-select-method))) |
| 1672 | (let ((prefix (gnus-group-prefixed-name "" method))) | 1684 | (let ((prefix (gnus-group-prefixed-name "" method))) |
| 1673 | (goto-char (point-min)) | 1685 | (goto-char (point-min)) |
| 1674 | (while (and (not (eobp)) | 1686 | (while (and (not (eobp)) |
| 1675 | (progn (insert prefix) | 1687 | (progn (insert prefix) |
| 1676 | (zerop (forward-line 1))))))) | 1688 | (zerop (forward-line 1))))))) |
| 1677 | ;; Store the active file in a hash table. | 1689 | ;; Store the active file in a hash table. |
| 1678 | (goto-char (point-min)) | 1690 | (goto-char (point-min)) |
| 1679 | (let (group max min) | 1691 | (let (group max min) |
| @@ -2199,7 +2211,8 @@ If FORCE is non-nil, the .newsrc file is read." | |||
| 2199 | 2211 | ||
| 2200 | (defun gnus-gnus-to-quick-newsrc-format () | 2212 | (defun gnus-gnus-to-quick-newsrc-format () |
| 2201 | "Insert Gnus variables such as gnus-newsrc-alist in lisp format." | 2213 | "Insert Gnus variables such as gnus-newsrc-alist in lisp format." |
| 2202 | (let ((print-quoted t)) | 2214 | (let ((print-quoted t) |
| 2215 | (print-escape-newlines t)) | ||
| 2203 | (insert ";; -*- emacs-lisp -*-\n") | 2216 | (insert ";; -*- emacs-lisp -*-\n") |
| 2204 | (insert ";; Gnus startup file.\n") | 2217 | (insert ";; Gnus startup file.\n") |
| 2205 | (insert | 2218 | (insert |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 9c751cd19d7..1ed79489c32 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -631,7 +631,7 @@ is not run if `gnus-visual' is nil." | |||
| 631 | :type 'function) | 631 | :type 'function) |
| 632 | 632 | ||
| 633 | (defcustom gnus-parse-headers-hook | 633 | (defcustom gnus-parse-headers-hook |
| 634 | (list 'gnus-decode-rfc1522) | 634 | (list 'gnus-hack-decode-rfc1522 'gnus-decode-rfc1522) |
| 635 | "*A hook called before parsing the headers." | 635 | "*A hook called before parsing the headers." |
| 636 | :group 'gnus-various | 636 | :group 'gnus-various |
| 637 | :type 'hook) | 637 | :type 'hook) |
| @@ -1206,7 +1206,7 @@ increase the score of each group you read." | |||
| 1206 | "j" gnus-summary-goto-article | 1206 | "j" gnus-summary-goto-article |
| 1207 | "g" gnus-summary-goto-subject | 1207 | "g" gnus-summary-goto-subject |
| 1208 | "l" gnus-summary-goto-last-article | 1208 | "l" gnus-summary-goto-last-article |
| 1209 | "p" gnus-summary-pop-article) | 1209 | "o" gnus-summary-pop-article) |
| 1210 | 1210 | ||
| 1211 | (gnus-define-keys (gnus-summary-thread-map "T" gnus-summary-mode-map) | 1211 | (gnus-define-keys (gnus-summary-thread-map "T" gnus-summary-mode-map) |
| 1212 | "k" gnus-summary-kill-thread | 1212 | "k" gnus-summary-kill-thread |
| @@ -2027,7 +2027,7 @@ The following commands are available: | |||
| 2027 | 2027 | ||
| 2028 | (defmacro gnus-summary-article-sparse-p (article) | 2028 | (defmacro gnus-summary-article-sparse-p (article) |
| 2029 | "Say whether this article is a sparse article or not." | 2029 | "Say whether this article is a sparse article or not." |
| 2030 | ` (memq ,article gnus-newsgroup-sparse)) | 2030 | `(memq ,article gnus-newsgroup-sparse)) |
| 2031 | 2031 | ||
| 2032 | (defmacro gnus-summary-article-ancient-p (article) | 2032 | (defmacro gnus-summary-article-ancient-p (article) |
| 2033 | "Say whether this article is a sparse article or not." | 2033 | "Say whether this article is a sparse article or not." |
| @@ -3061,8 +3061,9 @@ If NO-DISPLAY, don't generate a summary buffer." | |||
| 3061 | "Return the headers of the GENERATIONeth parent of HEADERS." | 3061 | "Return the headers of the GENERATIONeth parent of HEADERS." |
| 3062 | (unless generation | 3062 | (unless generation |
| 3063 | (setq generation 1)) | 3063 | (setq generation 1)) |
| 3064 | (let (references parent) | 3064 | (let ((parent t) |
| 3065 | (while (and headers (not (zerop generation))) | 3065 | references) |
| 3066 | (while (and parent headers (not (zerop generation))) | ||
| 3066 | (setq references (mail-header-references headers)) | 3067 | (setq references (mail-header-references headers)) |
| 3067 | (when (and references | 3068 | (when (and references |
| 3068 | (setq parent (gnus-parent-id references)) | 3069 | (setq parent (gnus-parent-id references)) |
| @@ -3839,6 +3840,10 @@ If READ-ALL is non-nil, all articles in the group are selected." | |||
| 3839 | (set var (delq article (symbol-value var)))))) | 3840 | (set var (delq article (symbol-value var)))))) |
| 3840 | ;; Adjust assocs. | 3841 | ;; Adjust assocs. |
| 3841 | ((memq mark uncompressed) | 3842 | ((memq mark uncompressed) |
| 3843 | (when (not (listp (cdr (symbol-value var)))) | ||
| 3844 | (set var (list (symbol-value var)))) | ||
| 3845 | (when (not (listp (cdr articles))) | ||
| 3846 | (setq articles (list articles))) | ||
| 3842 | (while articles | 3847 | (while articles |
| 3843 | (when (or (not (consp (setq article (pop articles)))) | 3848 | (when (or (not (consp (setq article (pop articles)))) |
| 3844 | (< (car article) min) | 3849 | (< (car article) min) |
| @@ -4214,7 +4219,7 @@ The resulting hash table is returned, or nil if no Xrefs were found." | |||
| 4214 | (progn | 4219 | (progn |
| 4215 | (goto-char p) | 4220 | (goto-char p) |
| 4216 | (if (search-forward "\nlines: " nil t) | 4221 | (if (search-forward "\nlines: " nil t) |
| 4217 | (if (numberp (setq lines (read cur))) | 4222 | (if (numberp (setq lines (ignore-errors (read cur)))) |
| 4218 | lines 0) | 4223 | lines 0) |
| 4219 | 0)) | 4224 | 0)) |
| 4220 | ;; Xref. | 4225 | ;; Xref. |
| @@ -4837,6 +4842,9 @@ The prefix argument ALL means to select all articles." | |||
| 4837 | (not non-destructive)) | 4842 | (not non-destructive)) |
| 4838 | (setq gnus-newsgroup-scored nil)) | 4843 | (setq gnus-newsgroup-scored nil)) |
| 4839 | ;; Set the new ranges of read articles. | 4844 | ;; Set the new ranges of read articles. |
| 4845 | (save-excursion | ||
| 4846 | (set-buffer gnus-group-buffer) | ||
| 4847 | (gnus-undo-force-boundary)) | ||
| 4840 | (gnus-update-read-articles | 4848 | (gnus-update-read-articles |
| 4841 | group (append gnus-newsgroup-unreads gnus-newsgroup-unselected)) | 4849 | group (append gnus-newsgroup-unreads gnus-newsgroup-unselected)) |
| 4842 | ;; Set the current article marks. | 4850 | ;; Set the current article marks. |
| @@ -4873,6 +4881,7 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil." | |||
| 4873 | (let* ((group gnus-newsgroup-name) | 4881 | (let* ((group gnus-newsgroup-name) |
| 4874 | (quit-config (gnus-group-quit-config gnus-newsgroup-name)) | 4882 | (quit-config (gnus-group-quit-config gnus-newsgroup-name)) |
| 4875 | (mode major-mode) | 4883 | (mode major-mode) |
| 4884 | (group-point nil) | ||
| 4876 | (buf (current-buffer))) | 4885 | (buf (current-buffer))) |
| 4877 | (run-hooks 'gnus-summary-prepare-exit-hook) | 4886 | (run-hooks 'gnus-summary-prepare-exit-hook) |
| 4878 | ;; If we have several article buffers, we kill them at exit. | 4887 | ;; If we have several article buffers, we kill them at exit. |
| @@ -4899,6 +4908,7 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil." | |||
| 4899 | (run-hooks 'gnus-summary-exit-hook) | 4908 | (run-hooks 'gnus-summary-exit-hook) |
| 4900 | (unless quit-config | 4909 | (unless quit-config |
| 4901 | (gnus-group-next-unread-group 1)) | 4910 | (gnus-group-next-unread-group 1)) |
| 4911 | (setq group-point (point)) | ||
| 4902 | (if temporary | 4912 | (if temporary |
| 4903 | nil ;Nothing to do. | 4913 | nil ;Nothing to do. |
| 4904 | ;; If we have several article buffers, we kill them at exit. | 4914 | ;; If we have several article buffers, we kill them at exit. |
| @@ -4928,8 +4938,7 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil." | |||
| 4928 | ;; Clear the current group name. | 4938 | ;; Clear the current group name. |
| 4929 | (if (not quit-config) | 4939 | (if (not quit-config) |
| 4930 | (progn | 4940 | (progn |
| 4931 | (gnus-group-jump-to-group group) | 4941 | (goto-char group-point) |
| 4932 | (gnus-group-next-unread-group 1) | ||
| 4933 | (gnus-configure-windows 'group 'force)) | 4942 | (gnus-configure-windows 'group 'force)) |
| 4934 | (gnus-handle-ephemeral-exit quit-config)) | 4943 | (gnus-handle-ephemeral-exit quit-config)) |
| 4935 | (unless quit-config | 4944 | (unless quit-config |
| @@ -5015,7 +5024,7 @@ which existed when entering the ephemeral is reset." | |||
| 5015 | (suppress-keymap gnus-dead-summary-mode-map) | 5024 | (suppress-keymap gnus-dead-summary-mode-map) |
| 5016 | (substitute-key-definition | 5025 | (substitute-key-definition |
| 5017 | 'undefined 'gnus-summary-wake-up-the-dead gnus-dead-summary-mode-map) | 5026 | 'undefined 'gnus-summary-wake-up-the-dead gnus-dead-summary-mode-map) |
| 5018 | (let ((keys '("\C-d" "\r" "\177"))) | 5027 | (let ((keys '("\C-d" "\r" "\177" [delete]))) |
| 5019 | (while keys | 5028 | (while keys |
| 5020 | (define-key gnus-dead-summary-mode-map | 5029 | (define-key gnus-dead-summary-mode-map |
| 5021 | (pop keys) 'gnus-summary-wake-up-the-dead)))) | 5030 | (pop keys) 'gnus-summary-wake-up-the-dead)))) |
| @@ -5032,11 +5041,8 @@ which existed when entering the ephemeral is reset." | |||
| 5032 | (if (null arg) (not gnus-dead-summary-mode) | 5041 | (if (null arg) (not gnus-dead-summary-mode) |
| 5033 | (> (prefix-numeric-value arg) 0))) | 5042 | (> (prefix-numeric-value arg) 0))) |
| 5034 | (when gnus-dead-summary-mode | 5043 | (when gnus-dead-summary-mode |
| 5035 | (unless (assq 'gnus-dead-summary-mode minor-mode-alist) | 5044 | (gnus-add-minor-mode |
| 5036 | (push '(gnus-dead-summary-mode " Dead") minor-mode-alist)) | 5045 | 'gnus-dead-summary-mode " Dead" gnus-dead-summary-mode-map)))) |
| 5037 | (unless (assq 'gnus-dead-summary-mode minor-mode-map-alist) | ||
| 5038 | (push (cons 'gnus-dead-summary-mode gnus-dead-summary-mode-map) | ||
| 5039 | minor-mode-map-alist))))) | ||
| 5040 | 5046 | ||
| 5041 | (defun gnus-deaden-summary () | 5047 | (defun gnus-deaden-summary () |
| 5042 | "Make the current summary buffer into a dead summary buffer." | 5048 | "Make the current summary buffer into a dead summary buffer." |
| @@ -5101,7 +5107,8 @@ in." | |||
| 5101 | (when current-prefix-arg | 5107 | (when current-prefix-arg |
| 5102 | (completing-read | 5108 | (completing-read |
| 5103 | "Faq dir: " (and (listp gnus-group-faq-directory) | 5109 | "Faq dir: " (and (listp gnus-group-faq-directory) |
| 5104 | gnus-group-faq-directory))))) | 5110 | (mapcar (lambda (file) (list file)) |
| 5111 | gnus-group-faq-directory)))))) | ||
| 5105 | (let (gnus-faq-buffer) | 5112 | (let (gnus-faq-buffer) |
| 5106 | (when (setq gnus-faq-buffer | 5113 | (when (setq gnus-faq-buffer |
| 5107 | (gnus-group-fetch-faq gnus-newsgroup-name faq-dir)) | 5114 | (gnus-group-fetch-faq gnus-newsgroup-name faq-dir)) |
| @@ -5163,7 +5170,8 @@ previous group instead." | |||
| 5163 | (if (and (or (eq t unreads) | 5170 | (if (and (or (eq t unreads) |
| 5164 | (and unreads (not (zerop unreads)))) | 5171 | (and unreads (not (zerop unreads)))) |
| 5165 | (gnus-summary-read-group | 5172 | (gnus-summary-read-group |
| 5166 | target-group nil no-article current-buffer)) | 5173 | target-group nil no-article |
| 5174 | (and (buffer-name current-buffer) current-buffer))) | ||
| 5167 | (setq entered t) | 5175 | (setq entered t) |
| 5168 | (setq current-group target-group | 5176 | (setq current-group target-group |
| 5169 | target-group nil))))))) | 5177 | target-group nil))))))) |
| @@ -5311,7 +5319,7 @@ be displayed." | |||
| 5311 | did) | 5319 | did) |
| 5312 | (and (not pseudo) | 5320 | (and (not pseudo) |
| 5313 | (gnus-summary-article-pseudo-p article) | 5321 | (gnus-summary-article-pseudo-p article) |
| 5314 | (error "This is a pseudo-article.")) | 5322 | (error "This is a pseudo-article")) |
| 5315 | (prog1 | 5323 | (prog1 |
| 5316 | (save-excursion | 5324 | (save-excursion |
| 5317 | (set-buffer gnus-summary-buffer) | 5325 | (set-buffer gnus-summary-buffer) |
| @@ -5875,7 +5883,7 @@ If ALL, mark even excluded ticked and dormants as read." | |||
| 5875 | '<) | 5883 | '<) |
| 5876 | (sort gnus-newsgroup-limit '<))) | 5884 | (sort gnus-newsgroup-limit '<))) |
| 5877 | article) | 5885 | article) |
| 5878 | (setq gnus-newsgroup-unreads nil) | 5886 | (setq gnus-newsgroup-unreads gnus-newsgroup-limit) |
| 5879 | (if all | 5887 | (if all |
| 5880 | (setq gnus-newsgroup-dormant nil | 5888 | (setq gnus-newsgroup-dormant nil |
| 5881 | gnus-newsgroup-marked nil | 5889 | gnus-newsgroup-marked nil |
| @@ -5949,7 +5957,10 @@ If ALL, mark even excluded ticked and dormants as read." | |||
| 5949 | (mail-header-number (car thread)))) | 5957 | (mail-header-number (car thread)))) |
| 5950 | (progn | 5958 | (progn |
| 5951 | (if (<= (length (cdr thread)) 1) | 5959 | (if (<= (length (cdr thread)) 1) |
| 5952 | (setq thread (cadr thread)) | 5960 | (setq gnus-newsgroup-limit |
| 5961 | (delq (mail-header-number (car thread)) | ||
| 5962 | gnus-newsgroup-limit) | ||
| 5963 | thread (cadr thread)) | ||
| 5953 | (when (gnus-invisible-cut-children (cdr thread)) | 5964 | (when (gnus-invisible-cut-children (cdr thread)) |
| 5954 | (let ((th (cdr thread))) | 5965 | (let ((th (cdr thread))) |
| 5955 | (while th | 5966 | (while th |
| @@ -5957,8 +5968,7 @@ If ALL, mark even excluded ticked and dormants as read." | |||
| 5957 | gnus-newsgroup-limit) | 5968 | gnus-newsgroup-limit) |
| 5958 | (setq thread (car th) | 5969 | (setq thread (car th) |
| 5959 | th nil) | 5970 | th nil) |
| 5960 | (setq th (cdr th))))))))) | 5971 | (setq th (cdr th))))))))))) |
| 5961 | )) | ||
| 5962 | thread) | 5972 | thread) |
| 5963 | 5973 | ||
| 5964 | (defun gnus-cut-threads (threads) | 5974 | (defun gnus-cut-threads (threads) |
| @@ -6066,7 +6076,7 @@ fetch-old-headers verbiage, and so on." | |||
| 6066 | (gnus-nocem-unwanted-article-p | 6076 | (gnus-nocem-unwanted-article-p |
| 6067 | (mail-header-id (car thread)))) | 6077 | (mail-header-id (car thread)))) |
| 6068 | (progn | 6078 | (progn |
| 6069 | (setq gnus-newsgroup-reads | 6079 | (setq gnus-newsgroup-unreads |
| 6070 | (delq number gnus-newsgroup-unreads)) | 6080 | (delq number gnus-newsgroup-unreads)) |
| 6071 | t)))) | 6081 | t)))) |
| 6072 | ;; Nope, invisible article. | 6082 | ;; Nope, invisible article. |
| @@ -6174,12 +6184,17 @@ or `gnus-select-method', no matter what backend the article comes from." | |||
| 6174 | (let* ((header (gnus-id-to-header message-id)) | 6184 | (let* ((header (gnus-id-to-header message-id)) |
| 6175 | (sparse (and header | 6185 | (sparse (and header |
| 6176 | (gnus-summary-article-sparse-p | 6186 | (gnus-summary-article-sparse-p |
| 6177 | (mail-header-number header))))) | 6187 | (mail-header-number header)) |
| 6178 | (if header | 6188 | (memq (mail-header-number header) |
| 6189 | gnus-newsgroup-limit)))) | ||
| 6190 | (if (and header | ||
| 6191 | (or (not (gnus-summary-article-sparse-p | ||
| 6192 | (mail-header-number header))) | ||
| 6193 | sparse)) | ||
| 6179 | (prog1 | 6194 | (prog1 |
| 6180 | ;; The article is present in the buffer, to we just go to it. | 6195 | ;; The article is present in the buffer, so we just go to it. |
| 6181 | (gnus-summary-goto-article | 6196 | (gnus-summary-goto-article |
| 6182 | (mail-header-number header) nil header) | 6197 | (mail-header-number header) nil t) |
| 6183 | (when sparse | 6198 | (when sparse |
| 6184 | (gnus-summary-update-article (mail-header-number header)))) | 6199 | (gnus-summary-update-article (mail-header-number header)))) |
| 6185 | ;; We fetch the article | 6200 | ;; We fetch the article |
| @@ -6342,11 +6357,15 @@ If BACKWARD, search backward instead." | |||
| 6342 | "Search for an article containing REGEXP. | 6357 | "Search for an article containing REGEXP. |
| 6343 | Optional argument BACKWARD means do search for backward. | 6358 | Optional argument BACKWARD means do search for backward. |
| 6344 | `gnus-select-article-hook' is not called during the search." | 6359 | `gnus-select-article-hook' is not called during the search." |
| 6360 | ;; We have to require this here to make sure that the following | ||
| 6361 | ;; dynamic binding isn't shadowed by autoloading. | ||
| 6362 | (require 'gnus-async) | ||
| 6345 | (let ((gnus-select-article-hook nil) ;Disable hook. | 6363 | (let ((gnus-select-article-hook nil) ;Disable hook. |
| 6346 | (gnus-article-display-hook nil) | 6364 | (gnus-article-display-hook nil) |
| 6347 | (gnus-mark-article-hook nil) ;Inhibit marking as read. | 6365 | (gnus-mark-article-hook nil) ;Inhibit marking as read. |
| 6348 | (gnus-use-article-prefetch nil) | 6366 | (gnus-use-article-prefetch nil) |
| 6349 | (gnus-xmas-force-redisplay nil) ;Inhibit XEmacs redisplay. | 6367 | (gnus-xmas-force-redisplay nil) ;Inhibit XEmacs redisplay. |
| 6368 | (gnus-use-trees nil) ;Inhibit updating tree buffer. | ||
| 6350 | (sum (current-buffer)) | 6369 | (sum (current-buffer)) |
| 6351 | (found nil) | 6370 | (found nil) |
| 6352 | point) | 6371 | point) |
| @@ -6670,6 +6689,8 @@ and `request-accept' functions." | |||
| 6670 | (cond | 6689 | (cond |
| 6671 | ;; Move the article. | 6690 | ;; Move the article. |
| 6672 | ((eq action 'move) | 6691 | ((eq action 'move) |
| 6692 | ;; Remove this article from future suppression. | ||
| 6693 | (gnus-dup-unsuppress-article article) | ||
| 6673 | (gnus-request-move-article | 6694 | (gnus-request-move-article |
| 6674 | article ; Article to move | 6695 | article ; Article to move |
| 6675 | gnus-newsgroup-name ; From newsgroup | 6696 | gnus-newsgroup-name ; From newsgroup |
| @@ -6811,7 +6832,7 @@ and `request-accept' functions." | |||
| 6811 | (save-excursion | 6832 | (save-excursion |
| 6812 | (set-buffer gnus-group-buffer) | 6833 | (set-buffer gnus-group-buffer) |
| 6813 | (when (gnus-group-goto-group (car to-groups) t) | 6834 | (when (gnus-group-goto-group (car to-groups) t) |
| 6814 | (gnus-group-get-new-news-this-group 1)) | 6835 | (gnus-group-get-new-news-this-group 1 t)) |
| 6815 | (pop to-groups))) | 6836 | (pop to-groups))) |
| 6816 | 6837 | ||
| 6817 | (gnus-kill-buffer copy-buf) | 6838 | (gnus-kill-buffer copy-buf) |
| @@ -7004,7 +7025,7 @@ delete these instead." | |||
| 7004 | (gnus-set-global-variables) | 7025 | (gnus-set-global-variables) |
| 7005 | (unless (gnus-check-backend-function 'request-expire-articles | 7026 | (unless (gnus-check-backend-function 'request-expire-articles |
| 7006 | gnus-newsgroup-name) | 7027 | gnus-newsgroup-name) |
| 7007 | (error "The current newsgroup does not support article deletion.")) | 7028 | (error "The current newsgroup does not support article deletion")) |
| 7008 | ;; Compute the list of articles to delete. | 7029 | ;; Compute the list of articles to delete. |
| 7009 | (let ((articles (gnus-summary-work-articles n)) | 7030 | (let ((articles (gnus-summary-work-articles n)) |
| 7010 | not-deleted) | 7031 | not-deleted) |
| @@ -7042,11 +7063,12 @@ groups." | |||
| 7042 | (gnus-set-global-variables) | 7063 | (gnus-set-global-variables) |
| 7043 | (when (and (not force) | 7064 | (when (and (not force) |
| 7044 | (gnus-group-read-only-p)) | 7065 | (gnus-group-read-only-p)) |
| 7045 | (error "The current newsgroup does not support article editing.")) | 7066 | (error "The current newsgroup does not support article editing")) |
| 7046 | ;; Select article if needed. | 7067 | ;; Select article if needed. |
| 7047 | (unless (eq (gnus-summary-article-number) | 7068 | (unless (eq (gnus-summary-article-number) |
| 7048 | gnus-current-article) | 7069 | gnus-current-article) |
| 7049 | (gnus-summary-select-article t)) | 7070 | (gnus-summary-select-article t)) |
| 7071 | (gnus-article-date-original) | ||
| 7050 | (gnus-article-edit-article | 7072 | (gnus-article-edit-article |
| 7051 | `(lambda () | 7073 | `(lambda () |
| 7052 | (gnus-summary-edit-article-done | 7074 | (gnus-summary-edit-article-done |
| @@ -7063,7 +7085,7 @@ groups." | |||
| 7063 | (not (gnus-request-replace-article | 7085 | (not (gnus-request-replace-article |
| 7064 | (cdr gnus-article-current) (car gnus-article-current) | 7086 | (cdr gnus-article-current) (car gnus-article-current) |
| 7065 | (current-buffer)))) | 7087 | (current-buffer)))) |
| 7066 | (error "Couldn't replace article.") | 7088 | (error "Couldn't replace article") |
| 7067 | ;; Update the summary buffer. | 7089 | ;; Update the summary buffer. |
| 7068 | (if (and references | 7090 | (if (and references |
| 7069 | (equal (message-tokenize-header references " ") | 7091 | (equal (message-tokenize-header references " ") |
| @@ -7711,7 +7733,7 @@ even ticked and dormant ones." | |||
| 7711 | (setq scored (cdr scored))) | 7733 | (setq scored (cdr scored))) |
| 7712 | (if (not headers) | 7734 | (if (not headers) |
| 7713 | (when (not no-error) | 7735 | (when (not no-error) |
| 7714 | (error "No expunged articles hidden.")) | 7736 | (error "No expunged articles hidden")) |
| 7715 | (goto-char (point-min)) | 7737 | (goto-char (point-min)) |
| 7716 | (gnus-summary-prepare-unthreaded (nreverse headers)) | 7738 | (gnus-summary-prepare-unthreaded (nreverse headers)) |
| 7717 | (goto-char (point-min)) | 7739 | (goto-char (point-min)) |
| @@ -7742,7 +7764,9 @@ The number of articles marked as read is returned." | |||
| 7742 | (if (and not-mark | 7764 | (if (and not-mark |
| 7743 | (not gnus-newsgroup-adaptive) | 7765 | (not gnus-newsgroup-adaptive) |
| 7744 | (not gnus-newsgroup-auto-expire) | 7766 | (not gnus-newsgroup-auto-expire) |
| 7745 | (not gnus-suppress-duplicates)) | 7767 | (not gnus-suppress-duplicates) |
| 7768 | (or (not gnus-use-cache) | ||
| 7769 | (not (eq gnus-use-cache 'passive)))) | ||
| 7746 | (progn | 7770 | (progn |
| 7747 | (when all | 7771 | (when all |
| 7748 | (setq gnus-newsgroup-marked nil | 7772 | (setq gnus-newsgroup-marked nil |
| @@ -7866,9 +7890,9 @@ Note that the re-threading will only work if `gnus-thread-ignore-subject' | |||
| 7866 | is non-nil or the Subject: of both articles are the same." | 7890 | is non-nil or the Subject: of both articles are the same." |
| 7867 | (interactive) | 7891 | (interactive) |
| 7868 | (unless (not (gnus-group-read-only-p)) | 7892 | (unless (not (gnus-group-read-only-p)) |
| 7869 | (error "The current newsgroup does not support article editing.")) | 7893 | (error "The current newsgroup does not support article editing")) |
| 7870 | (unless (<= (length gnus-newsgroup-processable) 1) | 7894 | (unless (<= (length gnus-newsgroup-processable) 1) |
| 7871 | (error "No more than one article may be marked.")) | 7895 | (error "No more than one article may be marked")) |
| 7872 | (save-window-excursion | 7896 | (save-window-excursion |
| 7873 | (let ((gnus-article-buffer " *reparent*") | 7897 | (let ((gnus-article-buffer " *reparent*") |
| 7874 | (current-article (gnus-summary-article-number)) | 7898 | (current-article (gnus-summary-article-number)) |
| @@ -7878,13 +7902,13 @@ is non-nil or the Subject: of both articles are the same." | |||
| 7878 | (save-excursion | 7902 | (save-excursion |
| 7879 | (if (eq (forward-line -1) 0) | 7903 | (if (eq (forward-line -1) 0) |
| 7880 | (gnus-summary-article-number) | 7904 | (gnus-summary-article-number) |
| 7881 | (error "Beginning of summary buffer.")))))) | 7905 | (error "Beginning of summary buffer")))))) |
| 7882 | (unless (not (eq current-article parent-article)) | 7906 | (unless (not (eq current-article parent-article)) |
| 7883 | (error "An article may not be self-referential.")) | 7907 | (error "An article may not be self-referential")) |
| 7884 | (let ((message-id (mail-header-id | 7908 | (let ((message-id (mail-header-id |
| 7885 | (gnus-summary-article-header parent-article)))) | 7909 | (gnus-summary-article-header parent-article)))) |
| 7886 | (unless (and message-id (not (equal message-id ""))) | 7910 | (unless (and message-id (not (equal message-id ""))) |
| 7887 | (error "No message-id in desired parent.")) | 7911 | (error "No message-id in desired parent")) |
| 7888 | (gnus-summary-select-article t t nil current-article) | 7912 | (gnus-summary-select-article t t nil current-article) |
| 7889 | (set-buffer gnus-original-article-buffer) | 7913 | (set-buffer gnus-original-article-buffer) |
| 7890 | (let ((buf (format "%s" (buffer-string)))) | 7914 | (let ((buf (format "%s" (buffer-string)))) |
| @@ -7897,11 +7921,11 @@ is non-nil or the Subject: of both articles are the same." | |||
| 7897 | (unless (gnus-request-replace-article | 7921 | (unless (gnus-request-replace-article |
| 7898 | current-article (car gnus-article-current) | 7922 | current-article (car gnus-article-current) |
| 7899 | (current-buffer)) | 7923 | (current-buffer)) |
| 7900 | (error "Couldn't replace article.")))) | 7924 | (error "Couldn't replace article")))) |
| 7901 | (set-buffer gnus-summary-buffer) | 7925 | (set-buffer gnus-summary-buffer) |
| 7902 | (gnus-summary-unmark-all-processable) | 7926 | (gnus-summary-unmark-all-processable) |
| 7903 | (gnus-summary-rethread-current) | 7927 | (gnus-summary-rethread-current) |
| 7904 | (gnus-message 3 "Article %d is now the child of article %d." | 7928 | (gnus-message 3 "Article %d is now the child of article %d" |
| 7905 | current-article parent-article))))) | 7929 | current-article parent-article))))) |
| 7906 | 7930 | ||
| 7907 | (defun gnus-summary-toggle-threads (&optional arg) | 7931 | (defun gnus-summary-toggle-threads (&optional arg) |
| @@ -8469,7 +8493,8 @@ save those articles instead." | |||
| 8469 | (gnus-article-setup-buffer) | 8493 | (gnus-article-setup-buffer) |
| 8470 | (set-buffer gnus-article-buffer) | 8494 | (set-buffer gnus-article-buffer) |
| 8471 | (setq buffer-read-only nil) | 8495 | (setq buffer-read-only nil) |
| 8472 | (let ((command (if automatic command (read-string "Command: " command)))) | 8496 | (let ((command (if automatic command |
| 8497 | (read-string "Command: " (cons command 0))))) | ||
| 8473 | (erase-buffer) | 8498 | (erase-buffer) |
| 8474 | (insert "$ " command "\n\n") | 8499 | (insert "$ " command "\n\n") |
| 8475 | (if gnus-view-pseudo-asynchronously | 8500 | (if gnus-view-pseudo-asynchronously |
| @@ -8701,6 +8726,8 @@ save those articles instead." | |||
| 8701 | (lambda (buf) (switch-to-buffer buf) (gnus-summary-exit)) | 8726 | (lambda (buf) (switch-to-buffer buf) (gnus-summary-exit)) |
| 8702 | buffers))))) | 8727 | buffers))))) |
| 8703 | 8728 | ||
| 8729 | (gnus-ems-redefine) | ||
| 8730 | |||
| 8704 | (provide 'gnus-sum) | 8731 | (provide 'gnus-sum) |
| 8705 | 8732 | ||
| 8706 | (run-hooks 'gnus-sum-load-hook) | 8733 | (run-hooks 'gnus-sum-load-hook) |
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index c1b4f6b7975..413a43f53a6 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el | |||
| @@ -79,7 +79,6 @@ with some simple extensions. | |||
| 79 | 79 | ||
| 80 | (defvar gnus-topic-killed-topics nil) | 80 | (defvar gnus-topic-killed-topics nil) |
| 81 | (defvar gnus-topic-inhibit-change-level nil) | 81 | (defvar gnus-topic-inhibit-change-level nil) |
| 82 | (defvar gnus-topic-tallied-groups nil) | ||
| 83 | 82 | ||
| 84 | (defconst gnus-topic-line-format-alist | 83 | (defconst gnus-topic-line-format-alist |
| 85 | `((?n name ?s) | 84 | `((?n name ?s) |
| @@ -364,8 +363,6 @@ If LOWEST is non-nil, list all newsgroups of level LOWEST or higher." | |||
| 364 | (let ((buffer-read-only nil) | 363 | (let ((buffer-read-only nil) |
| 365 | (lowest (or lowest 1))) | 364 | (lowest (or lowest 1))) |
| 366 | 365 | ||
| 367 | (setq gnus-topic-tallied-groups nil) | ||
| 368 | |||
| 369 | (when (or (not gnus-topic-alist) | 366 | (when (or (not gnus-topic-alist) |
| 370 | (not gnus-topology-checked-p)) | 367 | (not gnus-topology-checked-p)) |
| 371 | (gnus-topic-check-topology)) | 368 | (gnus-topic-check-topology)) |
| @@ -441,10 +438,7 @@ articles in the topic and its subtopics." | |||
| 441 | (gnus-info-level info) (gnus-info-marks info) | 438 | (gnus-info-level info) (gnus-info-marks info) |
| 442 | (car entry) (gnus-info-method info))))) | 439 | (car entry) (gnus-info-method info))))) |
| 443 | (when (and (listp entry) | 440 | (when (and (listp entry) |
| 444 | (numberp (car entry)) | 441 | (numberp (car entry))) |
| 445 | (not (member (gnus-info-group (setq info (nth 2 entry))) | ||
| 446 | gnus-topic-tallied-groups))) | ||
| 447 | (push (gnus-info-group info) gnus-topic-tallied-groups) | ||
| 448 | (incf unread (car entry))) | 442 | (incf unread (car entry))) |
| 449 | (when (listp entry) | 443 | (when (listp entry) |
| 450 | (setq tick t))) | 444 | (setq tick t))) |
| @@ -520,8 +514,7 @@ articles in the topic and its subtopics." | |||
| 520 | (gnus-add-text-properties | 514 | (gnus-add-text-properties |
| 521 | (point) | 515 | (point) |
| 522 | (prog1 (1+ (point)) | 516 | (prog1 (1+ (point)) |
| 523 | (eval gnus-topic-line-format-spec) | 517 | (eval gnus-topic-line-format-spec)) |
| 524 | (gnus-topic-remove-excess-properties)1) | ||
| 525 | (list 'gnus-topic (intern name) | 518 | (list 'gnus-topic (intern name) |
| 526 | 'gnus-topic-level level | 519 | 'gnus-topic-level level |
| 527 | 'gnus-topic-unread unread | 520 | 'gnus-topic-unread unread |
| @@ -549,12 +542,14 @@ articles in the topic and its subtopics." | |||
| 549 | (when (and (eq major-mode 'gnus-group-mode) | 542 | (when (and (eq major-mode 'gnus-group-mode) |
| 550 | gnus-topic-mode) | 543 | gnus-topic-mode) |
| 551 | (let ((group (gnus-group-group-name)) | 544 | (let ((group (gnus-group-group-name)) |
| 545 | (m (point-marker)) | ||
| 552 | (buffer-read-only nil)) | 546 | (buffer-read-only nil)) |
| 553 | (when (and group | 547 | (when (and group |
| 554 | (gnus-get-info group) | 548 | (gnus-get-info group) |
| 555 | (gnus-topic-goto-topic (gnus-current-topic))) | 549 | (gnus-topic-goto-topic (gnus-current-topic))) |
| 556 | (gnus-topic-update-topic-line (gnus-group-topic-name)) | 550 | (gnus-topic-update-topic-line (gnus-group-topic-name)) |
| 557 | (gnus-group-goto-group group) | 551 | (goto-char m) |
| 552 | (set-marker m nil) | ||
| 558 | (gnus-group-position-point))))) | 553 | (gnus-group-position-point))))) |
| 559 | 554 | ||
| 560 | (defun gnus-topic-goto-missing-group (group) | 555 | (defun gnus-topic-goto-missing-group (group) |
| @@ -648,7 +643,6 @@ articles in the topic and its subtopics." | |||
| 648 | (setq gnus-topic-active-topology nil | 643 | (setq gnus-topic-active-topology nil |
| 649 | gnus-topic-active-alist nil | 644 | gnus-topic-active-alist nil |
| 650 | gnus-topic-killed-topics nil | 645 | gnus-topic-killed-topics nil |
| 651 | gnus-topic-tallied-groups nil | ||
| 652 | gnus-topology-checked-p nil)) | 646 | gnus-topology-checked-p nil)) |
| 653 | 647 | ||
| 654 | (defun gnus-topic-check-topology () | 648 | (defun gnus-topic-check-topology () |
| @@ -681,18 +675,20 @@ articles in the topic and its subtopics." | |||
| 681 | ;; they belong to some topic. | 675 | ;; they belong to some topic. |
| 682 | (let* ((tgroups (apply 'append (mapcar (lambda (entry) (cdr entry)) | 676 | (let* ((tgroups (apply 'append (mapcar (lambda (entry) (cdr entry)) |
| 683 | gnus-topic-alist))) | 677 | gnus-topic-alist))) |
| 684 | (entry (assoc (caar gnus-topic-topology) gnus-topic-alist)) | 678 | (entry (last (assoc (caar gnus-topic-topology) gnus-topic-alist))) |
| 685 | (newsrc (cdr gnus-newsrc-alist)) | 679 | (newsrc (cdr gnus-newsrc-alist)) |
| 686 | group) | 680 | group) |
| 687 | (while newsrc | 681 | (while newsrc |
| 688 | (unless (member (setq group (gnus-info-group (pop newsrc))) tgroups) | 682 | (unless (member (setq group (gnus-info-group (pop newsrc))) tgroups) |
| 689 | (setcdr entry (cons group (cdr entry)))))) | 683 | (setcdr entry (list group)) |
| 684 | (setq entry (cdr entry))))) | ||
| 690 | ;; Go through all topics and make sure they contain only living groups. | 685 | ;; Go through all topics and make sure they contain only living groups. |
| 691 | (let ((alist gnus-topic-alist) | 686 | (let ((alist gnus-topic-alist) |
| 692 | topic) | 687 | topic) |
| 693 | (while (setq topic (pop alist)) | 688 | (while (setq topic (pop alist)) |
| 694 | (while (cdr topic) | 689 | (while (cdr topic) |
| 695 | (if (gnus-gethash (cadr topic) gnus-newsrc-hashtb) | 690 | (if (and (cadr topic) |
| 691 | (gnus-gethash (cadr topic) gnus-newsrc-hashtb)) | ||
| 696 | (setq topic (cdr topic)) | 692 | (setq topic (cdr topic)) |
| 697 | (setcdr topic (cddr topic))))))) | 693 | (setcdr topic (cddr topic))))))) |
| 698 | 694 | ||
| @@ -729,10 +725,11 @@ articles in the topic and its subtopics." | |||
| 729 | (push (cons topic-name (nreverse filtered-topic)) result))) | 725 | (push (cons topic-name (nreverse filtered-topic)) result))) |
| 730 | (setq gnus-topic-alist (nreverse result)))) | 726 | (setq gnus-topic-alist (nreverse result)))) |
| 731 | 727 | ||
| 732 | (defun gnus-topic-change-level (group level oldlevel) | 728 | (defun gnus-topic-change-level (group level oldlevel &optional previous) |
| 733 | "Run when changing levels to enter/remove groups from topics." | 729 | "Run when changing levels to enter/remove groups from topics." |
| 734 | (save-excursion | 730 | (save-excursion |
| 735 | (set-buffer gnus-group-buffer) | 731 | (set-buffer gnus-group-buffer) |
| 732 | (gnus-group-goto-group (or (car (nth 2 previous)) group)) | ||
| 736 | (when (and gnus-topic-mode | 733 | (when (and gnus-topic-mode |
| 737 | gnus-topic-alist | 734 | gnus-topic-alist |
| 738 | (not gnus-topic-inhibit-change-level)) | 735 | (not gnus-topic-inhibit-change-level)) |
| @@ -900,7 +897,9 @@ articles in the topic and its subtopics." | |||
| 900 | "\C-i" gnus-topic-indent | 897 | "\C-i" gnus-topic-indent |
| 901 | [tab] gnus-topic-indent | 898 | [tab] gnus-topic-indent |
| 902 | "r" gnus-topic-rename | 899 | "r" gnus-topic-rename |
| 903 | "\177" gnus-topic-delete) | 900 | "\177" gnus-topic-delete |
| 901 | [delete] gnus-topic-delete | ||
| 902 | "h" gnus-topic-toggle-display-empty-topics) | ||
| 904 | 903 | ||
| 905 | (gnus-define-keys (gnus-topic-sort-map "S" gnus-group-topic-map) | 904 | (gnus-define-keys (gnus-topic-sort-map "S" gnus-group-topic-map) |
| 906 | "s" gnus-topic-sort-groups | 905 | "s" gnus-topic-sort-groups |
| @@ -930,7 +929,9 @@ articles in the topic and its subtopics." | |||
| 930 | ["Rename" gnus-topic-rename t] | 929 | ["Rename" gnus-topic-rename t] |
| 931 | ["Create" gnus-topic-create-topic t] | 930 | ["Create" gnus-topic-create-topic t] |
| 932 | ["Mark" gnus-topic-mark-topic t] | 931 | ["Mark" gnus-topic-mark-topic t] |
| 933 | ["Indent" gnus-topic-indent t]) | 932 | ["Indent" gnus-topic-indent t] |
| 933 | ["Toggle hide empty" gnus-topic-toggle-display-empty-topics t] | ||
| 934 | ["Edit parameters" gnus-topic-edit-parameters t]) | ||
| 934 | ["List active" gnus-topic-list-active t])))) | 935 | ["List active" gnus-topic-list-active t])))) |
| 935 | 936 | ||
| 936 | (defun gnus-topic-mode (&optional arg redisplay) | 937 | (defun gnus-topic-mode (&optional arg redisplay) |
| @@ -942,17 +943,14 @@ articles in the topic and its subtopics." | |||
| 942 | (if (null arg) (not gnus-topic-mode) | 943 | (if (null arg) (not gnus-topic-mode) |
| 943 | (> (prefix-numeric-value arg) 0))) | 944 | (> (prefix-numeric-value arg) 0))) |
| 944 | ;; Infest Gnus with topics. | 945 | ;; Infest Gnus with topics. |
| 945 | (when gnus-topic-mode | 946 | (if (not gnus-topic-mode) |
| 947 | (setq gnus-goto-missing-group-function nil) | ||
| 946 | (when (gnus-visual-p 'topic-menu 'menu) | 948 | (when (gnus-visual-p 'topic-menu 'menu) |
| 947 | (gnus-topic-make-menu-bar)) | 949 | (gnus-topic-make-menu-bar)) |
| 948 | (setq gnus-topic-line-format-spec | 950 | (setq gnus-topic-line-format-spec |
| 949 | (gnus-parse-format gnus-topic-line-format | 951 | (gnus-parse-format gnus-topic-line-format |
| 950 | gnus-topic-line-format-alist t)) | 952 | gnus-topic-line-format-alist t)) |
| 951 | (unless (assq 'gnus-topic-mode minor-mode-alist) | 953 | (gnus-add-minor-mode 'gnus-topic-mode " Topic" gnus-topic-mode-map) |
| 952 | (push '(gnus-topic-mode " Topic") minor-mode-alist)) | ||
| 953 | (unless (assq 'gnus-topic-mode minor-mode-map-alist) | ||
| 954 | (push (cons 'gnus-topic-mode gnus-topic-mode-map) | ||
| 955 | minor-mode-map-alist)) | ||
| 956 | (add-hook 'gnus-summary-exit-hook 'gnus-topic-update-topic) | 954 | (add-hook 'gnus-summary-exit-hook 'gnus-topic-update-topic) |
| 957 | (add-hook 'gnus-group-catchup-group-hook 'gnus-topic-update-topic) | 955 | (add-hook 'gnus-group-catchup-group-hook 'gnus-topic-update-topic) |
| 958 | (set (make-local-variable 'gnus-group-prepare-function) | 956 | (set (make-local-variable 'gnus-group-prepare-function) |
| @@ -1024,6 +1022,8 @@ If performed over a topic line, toggle folding the topic." | |||
| 1024 | (gnus-group-read-group all no-article group))) | 1022 | (gnus-group-read-group all no-article group))) |
| 1025 | 1023 | ||
| 1026 | (defun gnus-topic-create-topic (topic parent &optional previous full-topic) | 1024 | (defun gnus-topic-create-topic (topic parent &optional previous full-topic) |
| 1025 | "Create a new TOPIC under PARENT. | ||
| 1026 | When used interactively, PARENT will be the topic under point." | ||
| 1027 | (interactive | 1027 | (interactive |
| 1028 | (list | 1028 | (list |
| 1029 | (read-string "New topic: ") | 1029 | (read-string "New topic: ") |
| @@ -1234,7 +1234,8 @@ If COPYP, copy the groups instead." | |||
| 1234 | ;; Remove from alist. | 1234 | ;; Remove from alist. |
| 1235 | (setq gnus-topic-alist (delq entry gnus-topic-alist)) | 1235 | (setq gnus-topic-alist (delq entry gnus-topic-alist)) |
| 1236 | ;; Remove from topology. | 1236 | ;; Remove from topology. |
| 1237 | (gnus-topic-find-topology topic nil nil 'delete))) | 1237 | (gnus-topic-find-topology topic nil nil 'delete) |
| 1238 | (gnus-dribble-touch))) | ||
| 1238 | 1239 | ||
| 1239 | (defun gnus-topic-rename (old-name new-name) | 1240 | (defun gnus-topic-rename (old-name new-name) |
| 1240 | "Rename a topic." | 1241 | "Rename a topic." |
| @@ -1303,6 +1304,16 @@ If FORCE, always re-read the active file." | |||
| 1303 | gnus-killed-list gnus-zombie-list) | 1304 | gnus-killed-list gnus-zombie-list) |
| 1304 | (gnus-group-list-groups 9 nil 1))) | 1305 | (gnus-group-list-groups 9 nil 1))) |
| 1305 | 1306 | ||
| 1307 | (defun gnus-topic-toggle-display-empty-topics () | ||
| 1308 | "Show/hide topics that have no unread articles." | ||
| 1309 | (interactive) | ||
| 1310 | (setq gnus-topic-display-empty-topics | ||
| 1311 | (not gnus-topic-display-empty-topics)) | ||
| 1312 | (gnus-group-list-groups) | ||
| 1313 | (message "%s empty topics" | ||
| 1314 | (if gnus-topic-display-empty-topics | ||
| 1315 | "Showing" "Hiding"))) | ||
| 1316 | |||
| 1306 | ;;; Topic sorting functions | 1317 | ;;; Topic sorting functions |
| 1307 | 1318 | ||
| 1308 | (defun gnus-topic-edit-parameters (group) | 1319 | (defun gnus-topic-edit-parameters (group) |
| @@ -1312,7 +1323,7 @@ If performed on a topic, edit the topic parameters instead." | |||
| 1312 | (if group | 1323 | (if group |
| 1313 | (gnus-group-edit-group-parameters group) | 1324 | (gnus-group-edit-group-parameters group) |
| 1314 | (if (not (gnus-group-topic-p)) | 1325 | (if (not (gnus-group-topic-p)) |
| 1315 | (error "Nothing to edit on the current line.") | 1326 | (error "Nothing to edit on the current line") |
| 1316 | (let ((topic (gnus-group-topic-name))) | 1327 | (let ((topic (gnus-group-topic-name))) |
| 1317 | (gnus-edit-form | 1328 | (gnus-edit-form |
| 1318 | (gnus-topic-parameters topic) | 1329 | (gnus-topic-parameters topic) |
diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el index 4ce5d92a1e4..b34070a3373 100644 --- a/lisp/gnus/gnus-undo.el +++ b/lisp/gnus/gnus-undo.el | |||
| @@ -73,15 +73,15 @@ | |||
| 73 | "\M-\C-_" gnus-undo | 73 | "\M-\C-_" gnus-undo |
| 74 | "\C-_" gnus-undo | 74 | "\C-_" gnus-undo |
| 75 | "\C-xu" gnus-undo | 75 | "\C-xu" gnus-undo |
| 76 | [(control /)] gnus-undo ; many people are used to type `C-/' on | 76 | ;; many people are used to type `C-/' on X terminals and get `C-_'. |
| 77 | ; X terminals and get `C-_'. | 77 | [(control /)] gnus-undo)) |
| 78 | )) | ||
| 79 | 78 | ||
| 80 | (defun gnus-undo-make-menu-bar () | 79 | (defun gnus-undo-make-menu-bar () |
| 80 | ;; This is disabled for the time being. | ||
| 81 | (when nil | 81 | (when nil |
| 82 | (define-key-after (current-local-map) [menu-bar file gnus-undo] | 82 | (define-key-after (current-local-map) [menu-bar file gnus-undo] |
| 83 | (cons "Undo" 'gnus-undo-actions) | 83 | (cons "Undo" 'gnus-undo-actions) |
| 84 | [menu-bar file whatever]))) | 84 | [menu-bar file whatever]))) |
| 85 | 85 | ||
| 86 | (defun gnus-undo-mode (&optional arg) | 86 | (defun gnus-undo-mode (&optional arg) |
| 87 | "Minor mode for providing `undo' in Gnus buffers. | 87 | "Minor mode for providing `undo' in Gnus buffers. |
| @@ -97,15 +97,9 @@ | |||
| 97 | ;; Set up the menu. | 97 | ;; Set up the menu. |
| 98 | (when (gnus-visual-p 'undo-menu 'menu) | 98 | (when (gnus-visual-p 'undo-menu 'menu) |
| 99 | (gnus-undo-make-menu-bar)) | 99 | (gnus-undo-make-menu-bar)) |
| 100 | ;; Don't display anything in the mode line -- too annoying. | 100 | (gnus-add-minor-mode 'gnus-undo-mode "" gnus-undo-mode-map) |
| 101 | ;;(unless (assq 'gnus-undo-mode minor-mode-alist) | ||
| 102 | ;; (push '(gnus-undo-mode " Undo") minor-mode-alist)) | ||
| 103 | (unless (assq 'gnus-undo-mode minor-mode-map-alist) | ||
| 104 | (push (cons 'gnus-undo-mode gnus-undo-mode-map) | ||
| 105 | minor-mode-map-alist)) | ||
| 106 | (make-local-hook 'post-command-hook) | 101 | (make-local-hook 'post-command-hook) |
| 107 | (add-hook 'post-command-hook 'gnus-undo-boundary nil t) | 102 | (add-hook 'post-command-hook 'gnus-undo-boundary nil t) |
| 108 | (add-hook 'gnus-summary-exit-hook 'gnus-undo-boundary) | ||
| 109 | (run-hooks 'gnus-undo-mode-hook))) | 103 | (run-hooks 'gnus-undo-mode-hook))) |
| 110 | 104 | ||
| 111 | ;;; Interface functions. | 105 | ;;; Interface functions. |
| @@ -124,6 +118,11 @@ | |||
| 124 | (setq gnus-undo-boundary-inhibit nil) | 118 | (setq gnus-undo-boundary-inhibit nil) |
| 125 | (setq gnus-undo-boundary t))) | 119 | (setq gnus-undo-boundary t))) |
| 126 | 120 | ||
| 121 | (defun gnus-undo-force-boundary () | ||
| 122 | "Set Gnus undo boundary." | ||
| 123 | (setq gnus-undo-boundary-inhibit nil | ||
| 124 | gnus-undo-boundary t)) | ||
| 125 | |||
| 127 | (defun gnus-undo-register (form) | 126 | (defun gnus-undo-register (form) |
| 128 | "Register FORMS as something to be performed to undo a change. | 127 | "Register FORMS as something to be performed to undo a change. |
| 129 | FORMS may use backtick quote syntax." | 128 | FORMS may use backtick quote syntax." |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 0393d07ee9a..3d75515dfeb 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -255,7 +255,8 @@ | |||
| 255 | (date (mapcar (lambda (d) (and d (string-to-int d))) parse)) | 255 | (date (mapcar (lambda (d) (and d (string-to-int d))) parse)) |
| 256 | (time (mapcar 'string-to-int (timezone-parse-time (aref parse 3))))) | 256 | (time (mapcar 'string-to-int (timezone-parse-time (aref parse 3))))) |
| 257 | (encode-time (caddr time) (cadr time) (car time) | 257 | (encode-time (caddr time) (cadr time) (car time) |
| 258 | (caddr date) (cadr date) (car date) (nth 4 date)))) | 258 | (caddr date) (cadr date) (car date) |
| 259 | (* 60 (timezone-zone-to-minute (nth 4 date)))))) | ||
| 259 | 260 | ||
| 260 | (defun gnus-time-minus (t1 t2) | 261 | (defun gnus-time-minus (t1 t2) |
| 261 | "Subtract two internal times." | 262 | "Subtract two internal times." |
| @@ -530,7 +531,7 @@ Timezone package is used." | |||
| 530 | (unless gnus-xemacs | 531 | (unless gnus-xemacs |
| 531 | (let* ((overlayss (overlay-lists)) | 532 | (let* ((overlayss (overlay-lists)) |
| 532 | (buffer-read-only nil) | 533 | (buffer-read-only nil) |
| 533 | (overlays (nconc (car overlayss) (cdr overlayss)))) | 534 | (overlays (delq nil (nconc (car overlayss) (cdr overlayss))))) |
| 534 | (while overlays | 535 | (while overlays |
| 535 | (delete-overlay (pop overlays)))))) | 536 | (delete-overlay (pop overlays)))))) |
| 536 | 537 | ||
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index cd35ef7e1af..48c502d251d 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el | |||
| @@ -1388,7 +1388,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." | |||
| 1388 | 1388 | ||
| 1389 | (if (not (looking-at gnus-uu-begin-string)) | 1389 | (if (not (looking-at gnus-uu-begin-string)) |
| 1390 | (setq state (list 'middle)) | 1390 | (setq state (list 'middle)) |
| 1391 | ;; This is the beginning of an uuencoded article. | 1391 | ;; This is the beginning of a uuencoded article. |
| 1392 | ;; We replace certain characters that could make things messy. | 1392 | ;; We replace certain characters that could make things messy. |
| 1393 | (setq gnus-uu-file-name | 1393 | (setq gnus-uu-file-name |
| 1394 | (let ((nnheader-file-name-translation-alist | 1394 | (let ((nnheader-file-name-translation-alist |
| @@ -1779,7 +1779,7 @@ post the entire file." | |||
| 1779 | This may not be smart, as no other decoder I have seen are able to | 1779 | This may not be smart, as no other decoder I have seen are able to |
| 1780 | follow threads when collecting uuencoded articles. (Well, I have seen | 1780 | follow threads when collecting uuencoded articles. (Well, I have seen |
| 1781 | one package that does that - gnus-uu, but somehow, I don't think that | 1781 | one package that does that - gnus-uu, but somehow, I don't think that |
| 1782 | counts...) Default is nil." | 1782 | counts...) The default is nil." |
| 1783 | :group 'gnus-extract-post | 1783 | :group 'gnus-extract-post |
| 1784 | :type 'boolean) | 1784 | :type 'boolean) |
| 1785 | 1785 | ||
| @@ -1878,28 +1878,7 @@ If no file has been included, the user will be asked for a file." | |||
| 1878 | (setq file-name gnus-uu-post-inserted-file-name) | 1878 | (setq file-name gnus-uu-post-inserted-file-name) |
| 1879 | (setq file-name (gnus-uu-post-insert-binary))) | 1879 | (setq file-name (gnus-uu-post-insert-binary))) |
| 1880 | 1880 | ||
| 1881 | (if gnus-uu-post-threaded | 1881 | (gnus-uu-post-encoded file-name gnus-uu-post-threaded)) |
| 1882 | (let ((message-required-news-headers | ||
| 1883 | (if (memq 'Message-ID message-required-news-headers) | ||
| 1884 | message-required-news-headers | ||
| 1885 | (cons 'Message-ID message-required-news-headers))) | ||
| 1886 | gnus-inews-article-hook) | ||
| 1887 | |||
| 1888 | (setq gnus-inews-article-hook (if (listp gnus-inews-article-hook) | ||
| 1889 | gnus-inews-article-hook | ||
| 1890 | (list gnus-inews-article-hook))) | ||
| 1891 | (push | ||
| 1892 | '(lambda () | ||
| 1893 | (save-excursion | ||
| 1894 | (goto-char (point-min)) | ||
| 1895 | (if (re-search-forward "^Message-ID: \\(.*\\)$" nil t) | ||
| 1896 | (setq gnus-uu-post-message-id | ||
| 1897 | (buffer-substring | ||
| 1898 | (match-beginning 1) (match-end 1))) | ||
| 1899 | (setq gnus-uu-post-message-id nil)))) | ||
| 1900 | gnus-inews-article-hook) | ||
| 1901 | (gnus-uu-post-encoded file-name t)) | ||
| 1902 | (gnus-uu-post-encoded file-name nil))) | ||
| 1903 | (setq gnus-uu-post-inserted-file-name nil) | 1882 | (setq gnus-uu-post-inserted-file-name nil) |
| 1904 | (when gnus-uu-winconf-post-news | 1883 | (when gnus-uu-winconf-post-news |
| 1905 | (set-window-configuration gnus-uu-winconf-post-news))) | 1884 | (set-window-configuration gnus-uu-winconf-post-news))) |
| @@ -1966,12 +1945,12 @@ If no file has been included, the user will be asked for a file." | |||
| 1966 | (goto-char (point-min)) | 1945 | (goto-char (point-min)) |
| 1967 | (setq length (count-lines 1 (point-max))) | 1946 | (setq length (count-lines 1 (point-max))) |
| 1968 | (setq parts (/ length gnus-uu-post-length)) | 1947 | (setq parts (/ length gnus-uu-post-length)) |
| 1969 | (when (not (< (% length gnus-uu-post-length) 4)) | 1948 | (unless (< (% length gnus-uu-post-length) 4) |
| 1970 | (setq parts (1+ parts)))) | 1949 | (incf parts))) |
| 1971 | 1950 | ||
| 1972 | (when gnus-uu-post-separate-description | 1951 | (when gnus-uu-post-separate-description |
| 1973 | (forward-line -1)) | 1952 | (forward-line -1)) |
| 1974 | (kill-region (point) (point-max)) | 1953 | (delete-region (point) (point-max)) |
| 1975 | 1954 | ||
| 1976 | (goto-char (point-min)) | 1955 | (goto-char (point-min)) |
| 1977 | (re-search-forward | 1956 | (re-search-forward |
| @@ -1980,12 +1959,13 @@ If no file has been included, the user will be asked for a file." | |||
| 1980 | (setq header (buffer-substring 1 (point))) | 1959 | (setq header (buffer-substring 1 (point))) |
| 1981 | 1960 | ||
| 1982 | (goto-char (point-min)) | 1961 | (goto-char (point-min)) |
| 1983 | (if (not gnus-uu-post-separate-description) | 1962 | (when gnus-uu-post-separate-description |
| 1984 | () | 1963 | (when (re-search-forward "^Subject: " nil t) |
| 1985 | (when (and (not threaded) (re-search-forward "^Subject: " nil t)) | ||
| 1986 | (end-of-line) | 1964 | (end-of-line) |
| 1987 | (insert (format " (0/%d)" parts))) | 1965 | (insert (format " (0/%d)" parts))) |
| 1988 | (message-send)) | 1966 | (save-excursion |
| 1967 | (message-send)) | ||
| 1968 | (setq gnus-uu-post-message-id (message-fetch-field "message-id"))) | ||
| 1989 | 1969 | ||
| 1990 | (save-excursion | 1970 | (save-excursion |
| 1991 | (setq i 1) | 1971 | (setq i 1) |
| @@ -1995,7 +1975,7 @@ If no file has been included, the user will be asked for a file." | |||
| 1995 | (erase-buffer) | 1975 | (erase-buffer) |
| 1996 | (insert header) | 1976 | (insert header) |
| 1997 | (when (and threaded gnus-uu-post-message-id) | 1977 | (when (and threaded gnus-uu-post-message-id) |
| 1998 | (insert (format "References: %s\n" gnus-uu-post-message-id))) | 1978 | (insert "References: " gnus-uu-post-message-id "\n")) |
| 1999 | (insert separator) | 1979 | (insert separator) |
| 2000 | (setq whole-len | 1980 | (setq whole-len |
| 2001 | (- 62 (length (format top-string "" file-name i parts "")))) | 1981 | (- 62 (length (format top-string "" file-name i parts "")))) |
| @@ -2010,15 +1990,9 @@ If no file has been included, the user will be asked for a file." | |||
| 2010 | (if (= 0 (% whole-len 2)) (1- minlen) minlen) ?-))) | 1990 | (if (= 0 (% whole-len 2)) (1- minlen) minlen) ?-))) |
| 2011 | 1991 | ||
| 2012 | (goto-char (point-min)) | 1992 | (goto-char (point-min)) |
| 2013 | (if (not (re-search-forward "^Subject: " nil t)) | 1993 | (when (re-search-forward "^Subject: " nil t) |
| 2014 | () | 1994 | (end-of-line) |
| 2015 | (if (not threaded) | 1995 | (insert (format " (%d/%d)" i parts))) |
| 2016 | (progn | ||
| 2017 | (end-of-line) | ||
| 2018 | (insert (format " (%d/%d)" i parts))) | ||
| 2019 | (when (or (and (= i 2) gnus-uu-post-separate-description) | ||
| 2020 | (and (= i 1) (not gnus-uu-post-separate-description))) | ||
| 2021 | (replace-match "Subject: Re: ")))) | ||
| 2022 | 1996 | ||
| 2023 | (goto-char (point-max)) | 1997 | (goto-char (point-max)) |
| 2024 | (save-excursion | 1998 | (save-excursion |
| @@ -2031,10 +2005,9 @@ If no file has been included, the user will be asked for a file." | |||
| 2031 | (forward-line -4)) | 2005 | (forward-line -4)) |
| 2032 | (setq end (point))) | 2006 | (setq end (point))) |
| 2033 | (insert-buffer-substring uubuf beg end) | 2007 | (insert-buffer-substring uubuf beg end) |
| 2034 | (insert beg-line) | 2008 | (insert beg-line "\n") |
| 2035 | (insert "\n") | ||
| 2036 | (setq beg end) | 2009 | (setq beg end) |
| 2037 | (setq i (1+ i)) | 2010 | (incf i) |
| 2038 | (goto-char (point-min)) | 2011 | (goto-char (point-min)) |
| 2039 | (re-search-forward | 2012 | (re-search-forward |
| 2040 | (concat "^" (regexp-quote mail-header-separator) "$") nil t) | 2013 | (concat "^" (regexp-quote mail-header-separator) "$") nil t) |
| @@ -2048,12 +2021,14 @@ If no file has been included, the user will be asked for a file." | |||
| 2048 | (insert beg-line) | 2021 | (insert beg-line) |
| 2049 | (insert "\n") | 2022 | (insert "\n") |
| 2050 | (let (message-sent-message-via) | 2023 | (let (message-sent-message-via) |
| 2051 | (message-send)))) | 2024 | (save-excursion |
| 2025 | (message-send)) | ||
| 2026 | (setq gnus-uu-post-message-id | ||
| 2027 | (concat (message-fetch-field "references") " " | ||
| 2028 | (message-fetch-field "message-id")))))) | ||
| 2052 | 2029 | ||
| 2053 | (when (setq buf (get-buffer send-buffer-name)) | 2030 | (gnus-kill-buffer send-buffer-name) |
| 2054 | (kill-buffer buf)) | 2031 | (gnus-kill-buffer encoded-buffer-name) |
| 2055 | (when (setq buf (get-buffer encoded-buffer-name)) | ||
| 2056 | (kill-buffer buf)) | ||
| 2057 | 2032 | ||
| 2058 | (when (not gnus-uu-post-separate-description) | 2033 | (when (not gnus-uu-post-separate-description) |
| 2059 | (set-buffer-modified-p nil) | 2034 | (set-buffer-modified-p nil) |
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index dab8c6fdc83..59a80e984f1 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el | |||
| @@ -184,6 +184,7 @@ See the Gnus manual for an explanation of the syntax used.") | |||
| 184 | (faq . gnus-faq-buffer) | 184 | (faq . gnus-faq-buffer) |
| 185 | (picons . "*Picons*") | 185 | (picons . "*Picons*") |
| 186 | (tree . gnus-tree-buffer) | 186 | (tree . gnus-tree-buffer) |
| 187 | (score-trace . "*Score Trace*") | ||
| 187 | (info . gnus-info-buffer) | 188 | (info . gnus-info-buffer) |
| 188 | (article-copy . gnus-article-copy) | 189 | (article-copy . gnus-article-copy) |
| 189 | (draft . gnus-draft-buffer)) | 190 | (draft . gnus-draft-buffer)) |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 0d73ceecbfe..6ab0c66958f 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -145,6 +145,18 @@ | |||
| 145 | :link '(custom-manual "(gnus)Various Summary Stuff") | 145 | :link '(custom-manual "(gnus)Various Summary Stuff") |
| 146 | :group 'gnus-summary) | 146 | :group 'gnus-summary) |
| 147 | 147 | ||
| 148 | (defgroup gnus-summary-pick nil | ||
| 149 | "Pick mode in the summary buffer." | ||
| 150 | :link '(custom-manual "(gnus)Pick and Read") | ||
| 151 | :prefix "gnus-pick-" | ||
| 152 | :group 'gnus-summary) | ||
| 153 | |||
| 154 | (defgroup gnus-summary-tree nil | ||
| 155 | "Tree display of threads in the summary buffer." | ||
| 156 | :link '(custom-manual "(gnus)Tree Display") | ||
| 157 | :prefix "gnus-tree-" | ||
| 158 | :group 'gnus-summary) | ||
| 159 | |||
| 148 | ;; Belongs to gnus-uu.el | 160 | ;; Belongs to gnus-uu.el |
| 149 | (defgroup gnus-extract-view nil | 161 | (defgroup gnus-extract-view nil |
| 150 | "Viewing extracted files." | 162 | "Viewing extracted files." |
| @@ -257,7 +269,6 @@ be set in `.emacs' instead." | |||
| 257 | (defalias 'gnus-extent-start-open 'ignore) | 269 | (defalias 'gnus-extent-start-open 'ignore) |
| 258 | (defalias 'gnus-set-text-properties 'set-text-properties) | 270 | (defalias 'gnus-set-text-properties 'set-text-properties) |
| 259 | (defalias 'gnus-group-remove-excess-properties 'ignore) | 271 | (defalias 'gnus-group-remove-excess-properties 'ignore) |
| 260 | (defalias 'gnus-topic-remove-excess-properties 'ignore) | ||
| 261 | (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window) | 272 | (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window) |
| 262 | (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names) | 273 | (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names) |
| 263 | (defalias 'gnus-character-to-event 'identity) | 274 | (defalias 'gnus-character-to-event 'identity) |
| @@ -649,12 +660,13 @@ be set in `.emacs' instead." | |||
| 649 | (save-excursion | 660 | (save-excursion |
| 650 | (save-restriction | 661 | (save-restriction |
| 651 | (narrow-to-region start end) | 662 | (narrow-to-region start end) |
| 652 | (indent-rigidly start end arg) | 663 | (let ((tab-width 8)) |
| 653 | ;; We translate tabs into spaces -- not everybody uses | 664 | (indent-rigidly start end arg) |
| 654 | ;; an 8-character tab. | 665 | ;; We translate tabs into spaces -- not everybody uses |
| 655 | (goto-char (point-min)) | 666 | ;; an 8-character tab. |
| 656 | (while (search-forward "\t" nil t) | 667 | (goto-char (point-min)) |
| 657 | (replace-match " " t t))))) | 668 | (while (search-forward "\t" nil t) |
| 669 | (replace-match " " t t)))))) | ||
| 658 | 670 | ||
| 659 | (defvar gnus-simple-splash nil) | 671 | (defvar gnus-simple-splash nil) |
| 660 | 672 | ||
| @@ -781,7 +793,7 @@ used to 899, you would say something along these lines: | |||
| 781 | (when (and gnus-default-nntp-server | 793 | (when (and gnus-default-nntp-server |
| 782 | (not (string= gnus-default-nntp-server ""))) | 794 | (not (string= gnus-default-nntp-server ""))) |
| 783 | gnus-default-nntp-server) | 795 | gnus-default-nntp-server) |
| 784 | (system-name))) | 796 | "news")) |
| 785 | (if (or (null gnus-nntp-service) | 797 | (if (or (null gnus-nntp-service) |
| 786 | (equal gnus-nntp-service "nntp")) | 798 | (equal gnus-nntp-service "nntp")) |
| 787 | nil | 799 | nil |
| @@ -1346,7 +1358,6 @@ want." | |||
| 1346 | gnus-article-fill-cited-article | 1358 | gnus-article-fill-cited-article |
| 1347 | gnus-article-remove-cr | 1359 | gnus-article-remove-cr |
| 1348 | gnus-article-de-quoted-unreadable | 1360 | gnus-article-de-quoted-unreadable |
| 1349 | gnus-article-display-x-face | ||
| 1350 | gnus-summary-stop-page-breaking | 1361 | gnus-summary-stop-page-breaking |
| 1351 | ;; gnus-summary-caesar-message | 1362 | ;; gnus-summary-caesar-message |
| 1352 | ;; gnus-summary-verbose-headers | 1363 | ;; gnus-summary-verbose-headers |
| @@ -1370,7 +1381,9 @@ want." | |||
| 1370 | gnus-article-strip-leading-blank-lines | 1381 | gnus-article-strip-leading-blank-lines |
| 1371 | gnus-article-strip-multiple-blank-lines | 1382 | gnus-article-strip-multiple-blank-lines |
| 1372 | gnus-article-strip-blank-lines | 1383 | gnus-article-strip-blank-lines |
| 1373 | gnus-article-treat-overstrike)) | 1384 | gnus-article-treat-overstrike |
| 1385 | gnus-article-display-x-face | ||
| 1386 | gnus-smiley-display)) | ||
| 1374 | 1387 | ||
| 1375 | (defcustom gnus-article-save-directory gnus-directory | 1388 | (defcustom gnus-article-save-directory gnus-directory |
| 1376 | "*Name of the directory articles will be saved in (default \"~/News\")." | 1389 | "*Name of the directory articles will be saved in (default \"~/News\")." |
| @@ -1643,7 +1656,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") | |||
| 1643 | gnus-article-next-page gnus-article-prev-page | 1656 | gnus-article-next-page gnus-article-prev-page |
| 1644 | gnus-request-article-this-buffer gnus-article-mode | 1657 | gnus-request-article-this-buffer gnus-article-mode |
| 1645 | gnus-article-setup-buffer gnus-narrow-to-page | 1658 | gnus-article-setup-buffer gnus-narrow-to-page |
| 1646 | gnus-article-delete-invisible-text) | 1659 | gnus-article-delete-invisible-text gnus-hack-decode-rfc1522) |
| 1647 | ("gnus-art" :interactive t | 1660 | ("gnus-art" :interactive t |
| 1648 | gnus-article-hide-headers gnus-article-hide-boring-headers | 1661 | gnus-article-hide-headers gnus-article-hide-boring-headers |
| 1649 | gnus-article-treat-overstrike gnus-article-word-wrap | 1662 | gnus-article-treat-overstrike gnus-article-word-wrap |
| @@ -1910,6 +1923,20 @@ This restriction may disappear in later versions of Gnus." | |||
| 1910 | ;;; Gnus Utility Functions | 1923 | ;;; Gnus Utility Functions |
| 1911 | ;;; | 1924 | ;;; |
| 1912 | 1925 | ||
| 1926 | (defmacro gnus-string-or (&rest strings) | ||
| 1927 | "Return the first element of STRINGS that is a non-blank string. | ||
| 1928 | STRINGS will be evaluated in normal `or' order." | ||
| 1929 | `(gnus-string-or-1 ',strings)) | ||
| 1930 | |||
| 1931 | (defun gnus-string-or-1 (strings) | ||
| 1932 | (let (string) | ||
| 1933 | (while strings | ||
| 1934 | (setq string (eval (pop strings))) | ||
| 1935 | (if (string-match "^[ \t]*$" string) | ||
| 1936 | (setq string nil) | ||
| 1937 | (setq strings nil))) | ||
| 1938 | string)) | ||
| 1939 | |||
| 1913 | ;; Add the current buffer to the list of buffers to be killed on exit. | 1940 | ;; Add the current buffer to the list of buffers to be killed on exit. |
| 1914 | (defun gnus-add-current-to-buffer-list () | 1941 | (defun gnus-add-current-to-buffer-list () |
| 1915 | (or (memq (current-buffer) gnus-buffer-list) | 1942 | (or (memq (current-buffer) gnus-buffer-list) |
| @@ -2001,7 +2028,7 @@ that that variable is buffer-local to the summary buffers." | |||
| 2001 | (string-match gnus-total-expirable-newsgroups group))))) | 2028 | (string-match gnus-total-expirable-newsgroups group))))) |
| 2002 | 2029 | ||
| 2003 | (defun gnus-group-auto-expirable-p (group) | 2030 | (defun gnus-group-auto-expirable-p (group) |
| 2004 | "Check whether GROUP is total-expirable or not." | 2031 | "Check whether GROUP is auto-expirable or not." |
| 2005 | (let ((params (gnus-group-find-parameter group)) | 2032 | (let ((params (gnus-group-find-parameter group)) |
| 2006 | val) | 2033 | val) |
| 2007 | (cond | 2034 | (cond |
| @@ -2064,7 +2091,7 @@ that that variable is buffer-local to the summary buffers." | |||
| 2064 | 2091 | ||
| 2065 | (defun gnus-simplify-mode-line () | 2092 | (defun gnus-simplify-mode-line () |
| 2066 | "Make mode lines a bit simpler." | 2093 | "Make mode lines a bit simpler." |
| 2067 | (setq mode-line-modified "-- ") | 2094 | (setq mode-line-modified (cdr gnus-mode-line-modified)) |
| 2068 | (when (listp mode-line-format) | 2095 | (when (listp mode-line-format) |
| 2069 | (make-local-variable 'mode-line-format) | 2096 | (make-local-variable 'mode-line-format) |
| 2070 | (setq mode-line-format (copy-sequence mode-line-format)) | 2097 | (setq mode-line-format (copy-sequence mode-line-format)) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 3c20f0192b2..3faf25edc6c 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -596,6 +596,25 @@ actually occur." | |||
| 596 | (defvar message-mh-deletable-headers '(Message-ID Date Lines Sender) | 596 | (defvar message-mh-deletable-headers '(Message-ID Date Lines Sender) |
| 597 | "If non-nil, delete the deletable headers before feeding to mh.") | 597 | "If non-nil, delete the deletable headers before feeding to mh.") |
| 598 | 598 | ||
| 599 | (defvar message-send-method-alist | ||
| 600 | '((news message-news-p message-send-via-news) | ||
| 601 | (mail message-mail-p message-send-via-mail)) | ||
| 602 | "Alist of ways to send outgoing messages. | ||
| 603 | Each element has the form | ||
| 604 | |||
| 605 | \(TYPE PREDICATE FUNCTION) | ||
| 606 | |||
| 607 | where TYPE is a symbol that names the method; PREDICATE is a function | ||
| 608 | called without any parameters to determine whether the message is | ||
| 609 | a message of type TYPE; and FUNCTION is a function to be called if | ||
| 610 | PREDICATE returns non-nil. FUNCTION is called with one parameter -- | ||
| 611 | the prefix.") | ||
| 612 | |||
| 613 | (defvar message-mail-alias-type 'abbrev | ||
| 614 | "*What alias expansion type to use in Message buffers. | ||
| 615 | The default is `abbrev', which uses mailabbrev. nil switches | ||
| 616 | mail aliases off.") | ||
| 617 | |||
| 599 | ;;; Internal variables. | 618 | ;;; Internal variables. |
| 600 | ;;; Well, not really internal. | 619 | ;;; Well, not really internal. |
| 601 | 620 | ||
| @@ -725,19 +744,19 @@ Defaults to `text-mode-abbrev-table'.") | |||
| 725 | (let* ((cite-prefix "A-Za-z") | 744 | (let* ((cite-prefix "A-Za-z") |
| 726 | (cite-suffix (concat cite-prefix "0-9_.@-")) | 745 | (cite-suffix (concat cite-prefix "0-9_.@-")) |
| 727 | (content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)")) | 746 | (content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)")) |
| 728 | `((,(concat "^\\(To:\\)" content) | 747 | `((,(concat "^\\([Tt]o:\\)" content) |
| 729 | (1 'message-header-name-face) | 748 | (1 'message-header-name-face) |
| 730 | (2 'message-header-to-face nil t)) | 749 | (2 'message-header-to-face nil t)) |
| 731 | (,(concat "^\\(^[GBF]?[Cc][Cc]:\\|^Reply-To:\\)" content) | 750 | (,(concat "^\\(^[GBF]?[Cc][Cc]:\\|^[Rr]eply-[Tt]o:\\)" content) |
| 732 | (1 'message-header-name-face) | 751 | (1 'message-header-name-face) |
| 733 | (2 'message-header-cc-face nil t)) | 752 | (2 'message-header-cc-face nil t)) |
| 734 | (,(concat "^\\(Subject:\\)" content) | 753 | (,(concat "^\\([Ss]ubject:\\)" content) |
| 735 | (1 'message-header-name-face) | 754 | (1 'message-header-name-face) |
| 736 | (2 'message-header-subject-face nil t)) | 755 | (2 'message-header-subject-face nil t)) |
| 737 | (,(concat "^\\(Newsgroups:\\|Followup-to:\\)" content) | 756 | (,(concat "^\\([Nn]ewsgroups:\\|Followup-[Tt]o:\\)" content) |
| 738 | (1 'message-header-name-face) | 757 | (1 'message-header-name-face) |
| 739 | (2 'message-header-newsgroups-face nil t)) | 758 | (2 'message-header-newsgroups-face nil t)) |
| 740 | (,(concat "^\\([^: \n\t]+:\\)" content) | 759 | (,(concat "^\\([A-Z][^: \n\t]+:\\)" content) |
| 741 | (1 'message-header-name-face) | 760 | (1 'message-header-name-face) |
| 742 | (2 'message-header-other-face nil t)) | 761 | (2 'message-header-other-face nil t)) |
| 743 | (,(concat "^\\(X-[A-Za-z0-9-]+\\|In-Reply-To\\):" content) | 762 | (,(concat "^\\(X-[A-Za-z0-9-]+\\|In-Reply-To\\):" content) |
| @@ -1263,9 +1282,10 @@ C-c C-r message-caesar-buffer-body (rot13 the message body)." | |||
| 1263 | (easy-menu-add message-mode-menu message-mode-map) | 1282 | (easy-menu-add message-mode-menu message-mode-map) |
| 1264 | (easy-menu-add message-mode-field-menu message-mode-map) | 1283 | (easy-menu-add message-mode-field-menu message-mode-map) |
| 1265 | ;; Allow mail alias things. | 1284 | ;; Allow mail alias things. |
| 1266 | (if (fboundp 'mail-abbrevs-setup) | 1285 | (when (eq message-mail-alias-type 'abbrev) |
| 1267 | (mail-abbrevs-setup) | 1286 | (if (fboundp 'mail-abbrevs-setup) |
| 1268 | (funcall (intern "mail-aliases-setup"))) | 1287 | (mail-abbrevs-setup) |
| 1288 | (funcall (intern "mail-aliases-setup")))) | ||
| 1269 | (run-hooks 'text-mode-hook 'message-mode-hook)) | 1289 | (run-hooks 'text-mode-hook 'message-mode-hook)) |
| 1270 | 1290 | ||
| 1271 | 1291 | ||
| @@ -1348,11 +1368,15 @@ C-c C-r message-caesar-buffer-body (rot13 the message body)." | |||
| 1348 | 1368 | ||
| 1349 | 1369 | ||
| 1350 | 1370 | ||
| 1351 | (defun message-insert-to () | 1371 | (defun message-insert-to (&optional force) |
| 1352 | "Insert a To header that points to the author of the article being replied to." | 1372 | "Insert a To header that points to the author of the article being replied to. |
| 1353 | (interactive) | 1373 | If the original author requested not to be sent mail, the function signals |
| 1374 | an error. | ||
| 1375 | With the prefix argument FORCE, insert the header anyway." | ||
| 1376 | (interactive "P") | ||
| 1354 | (let ((co (message-fetch-reply-field "mail-copies-to"))) | 1377 | (let ((co (message-fetch-reply-field "mail-copies-to"))) |
| 1355 | (when (and co | 1378 | (when (and (null force) |
| 1379 | co | ||
| 1356 | (equal (downcase co) "never")) | 1380 | (equal (downcase co) "never")) |
| 1357 | (error "The user has requested not to have copies sent via mail"))) | 1381 | (error "The user has requested not to have copies sent via mail"))) |
| 1358 | (when (and (message-position-on-field "To") | 1382 | (when (and (message-position-on-field "To") |
| @@ -1733,30 +1757,43 @@ the user from the mailer." | |||
| 1733 | (message-fix-before-sending) | 1757 | (message-fix-before-sending) |
| 1734 | (run-hooks 'message-send-hook) | 1758 | (run-hooks 'message-send-hook) |
| 1735 | (message "Sending...") | 1759 | (message "Sending...") |
| 1736 | (when (and (or (not (message-news-p)) | 1760 | (let ((alist message-send-method-alist) |
| 1737 | (and (or (not (memq 'news message-sent-message-via)) | 1761 | (success t) |
| 1738 | (y-or-n-p | 1762 | elem sent) |
| 1739 | "Already sent message via news; resend? ")) | 1763 | (while (and success |
| 1740 | (funcall message-send-news-function arg))) | 1764 | (setq elem (pop alist))) |
| 1741 | (or (not (message-mail-p)) | 1765 | (when (and (or (not (funcall (cadr elem))) |
| 1742 | (and (or (not (memq 'mail message-sent-message-via)) | 1766 | (and (or (not (memq (car elem) |
| 1743 | (y-or-n-p | 1767 | message-sent-message-via)) |
| 1744 | "Already sent message via mail; resend? ")) | 1768 | (y-or-n-p |
| 1745 | (message-send-mail arg)))) | 1769 | (format |
| 1746 | (message-do-fcc) | 1770 | "Already sent message via %s; resend? " |
| 1747 | ;;(when (fboundp 'mail-hist-put-headers-into-history) | 1771 | (car elem)))) |
| 1748 | ;; (mail-hist-put-headers-into-history)) | 1772 | (setq success (funcall (caddr elem) arg))))) |
| 1749 | (run-hooks 'message-sent-hook) | 1773 | (setq sent t))) |
| 1750 | (message "Sending...done") | 1774 | (when (and success sent) |
| 1751 | ;; If buffer has no file, mark it as unmodified and delete autosave. | 1775 | (message-do-fcc) |
| 1752 | (unless buffer-file-name | 1776 | ;;(when (fboundp 'mail-hist-put-headers-into-history) |
| 1753 | (set-buffer-modified-p nil) | 1777 | ;; (mail-hist-put-headers-into-history)) |
| 1754 | (delete-auto-save-file-if-necessary t)) | 1778 | (run-hooks 'message-sent-hook) |
| 1755 | ;; Delete other mail buffers and stuff. | 1779 | (message "Sending...done") |
| 1756 | (message-do-send-housekeeping) | 1780 | ;; If buffer has no file, mark it as unmodified and delete autosave. |
| 1757 | (message-do-actions message-send-actions) | 1781 | (unless buffer-file-name |
| 1758 | ;; Return success. | 1782 | (set-buffer-modified-p nil) |
| 1759 | t))) | 1783 | (delete-auto-save-file-if-necessary t)) |
| 1784 | ;; Delete other mail buffers and stuff. | ||
| 1785 | (message-do-send-housekeeping) | ||
| 1786 | (message-do-actions message-send-actions) | ||
| 1787 | ;; Return success. | ||
| 1788 | t)))) | ||
| 1789 | |||
| 1790 | (defun message-send-via-mail (arg) | ||
| 1791 | "Send the current message via mail." | ||
| 1792 | (message-send-mail arg)) | ||
| 1793 | |||
| 1794 | (defun message-send-via-news (arg) | ||
| 1795 | "Send the current message via news." | ||
| 1796 | (funcall message-send-news-function arg)) | ||
| 1760 | 1797 | ||
| 1761 | (defun message-fix-before-sending () | 1798 | (defun message-fix-before-sending () |
| 1762 | "Do various things to make the message nice before sending it." | 1799 | "Do various things to make the message nice before sending it." |
| @@ -1926,10 +1963,10 @@ to find out how to use this." | |||
| 1926 | ;; qmail-inject doesn't say anything on it's stdout/stderr, | 1963 | ;; qmail-inject doesn't say anything on it's stdout/stderr, |
| 1927 | ;; we have to look at the retval instead | 1964 | ;; we have to look at the retval instead |
| 1928 | (0 nil) | 1965 | (0 nil) |
| 1929 | (1 (error "qmail-inject reported permanent failure.")) | 1966 | (1 (error "qmail-inject reported permanent failure")) |
| 1930 | (111 (error "qmail-inject reported transient failure.")) | 1967 | (111 (error "qmail-inject reported transient failure")) |
| 1931 | ;; should never happen | 1968 | ;; should never happen |
| 1932 | (t (error "qmail-inject reported unknown failure.")))) | 1969 | (t (error "qmail-inject reported unknown failure")))) |
| 1933 | 1970 | ||
| 1934 | (defun message-send-mail-with-mh () | 1971 | (defun message-send-mail-with-mh () |
| 1935 | "Send the prepared message buffer with mh." | 1972 | "Send the prepared message buffer with mh." |
| @@ -2007,7 +2044,8 @@ to find out how to use this." | |||
| 2007 | (funcall (intern (format "%s-open-server" (car method))) | 2044 | (funcall (intern (format "%s-open-server" (car method))) |
| 2008 | (cadr method) (cddr method)) | 2045 | (cadr method) (cddr method)) |
| 2009 | (setq result | 2046 | (setq result |
| 2010 | (funcall (intern (format "%s-request-post" (car method)))))) | 2047 | (funcall (intern (format "%s-request-post" (car method))) |
| 2048 | (cadr method)))) | ||
| 2011 | (kill-buffer tembuf)) | 2049 | (kill-buffer tembuf)) |
| 2012 | (set-buffer messbuf) | 2050 | (set-buffer messbuf) |
| 2013 | (if result | 2051 | (if result |
| @@ -2191,6 +2229,22 @@ to find out how to use this." | |||
| 2191 | (y-or-n-p | 2229 | (y-or-n-p |
| 2192 | (format "The %s header looks odd: \"%s\". Really post? " | 2230 | (format "The %s header looks odd: \"%s\". Really post? " |
| 2193 | (car headers) header))))) | 2231 | (car headers) header))))) |
| 2232 | (message-check 'repeated-newsgroups | ||
| 2233 | (let ((case-fold-search t) | ||
| 2234 | (headers '("Newsgroups" "Followup-To")) | ||
| 2235 | header error groups group) | ||
| 2236 | (while (and headers | ||
| 2237 | (not error)) | ||
| 2238 | (when (setq header (mail-fetch-field (pop headers))) | ||
| 2239 | (setq groups (message-tokenize-header header ",")) | ||
| 2240 | (while (setq group (pop groups)) | ||
| 2241 | (when (member group groups) | ||
| 2242 | (setq error group | ||
| 2243 | groups nil))))) | ||
| 2244 | (if (not error) | ||
| 2245 | t | ||
| 2246 | (y-or-n-p | ||
| 2247 | (format "Group %s is repeated in headers. Really post? " error))))) | ||
| 2194 | ;; Check the From header. | 2248 | ;; Check the From header. |
| 2195 | (message-check 'from | 2249 | (message-check 'from |
| 2196 | (let* ((case-fold-search t) | 2250 | (let* ((case-fold-search t) |
| @@ -2282,7 +2336,8 @@ to find out how to use this." | |||
| 2282 | (concat "^" (regexp-quote mail-header-separator) "$")) | 2336 | (concat "^" (regexp-quote mail-header-separator) "$")) |
| 2283 | (while (not (eobp)) | 2337 | (while (not (eobp)) |
| 2284 | (when (not (looking-at "[ \t\n]")) | 2338 | (when (not (looking-at "[ \t\n]")) |
| 2285 | (setq sum (logxor (ash sum 1) (following-char)))) | 2339 | (setq sum (logxor (ash sum 1) (if (natnump sum) 0 1) |
| 2340 | (following-char)))) | ||
| 2286 | (forward-char 1))) | 2341 | (forward-char 1))) |
| 2287 | sum)) | 2342 | sum)) |
| 2288 | 2343 | ||
| @@ -2373,16 +2428,21 @@ to find out how to use this." | |||
| 2373 | (defun message-make-message-id () | 2428 | (defun message-make-message-id () |
| 2374 | "Make a unique Message-ID." | 2429 | "Make a unique Message-ID." |
| 2375 | (concat "<" (message-unique-id) | 2430 | (concat "<" (message-unique-id) |
| 2376 | (let ((psubject (save-excursion (message-fetch-field "subject")))) | 2431 | (let ((psubject (save-excursion (message-fetch-field "subject"))) |
| 2377 | (if (and message-reply-headers | 2432 | (psupersedes |
| 2378 | (mail-header-references message-reply-headers) | 2433 | (save-excursion (message-fetch-field "supersedes")))) |
| 2379 | (mail-header-subject message-reply-headers) | 2434 | (if (or |
| 2380 | psubject | 2435 | (and message-reply-headers |
| 2381 | (mail-header-subject message-reply-headers) | 2436 | (mail-header-references message-reply-headers) |
| 2382 | (not (string= | 2437 | (mail-header-subject message-reply-headers) |
| 2383 | (message-strip-subject-re | 2438 | psubject |
| 2384 | (mail-header-subject message-reply-headers)) | 2439 | (mail-header-subject message-reply-headers) |
| 2385 | (message-strip-subject-re psubject)))) | 2440 | (not (string= |
| 2441 | (message-strip-subject-re | ||
| 2442 | (mail-header-subject message-reply-headers)) | ||
| 2443 | (message-strip-subject-re psubject)))) | ||
| 2444 | (and psupersedes | ||
| 2445 | (string-match "_-_@" psupersedes))) | ||
| 2386 | "_-_" "")) | 2446 | "_-_" "")) |
| 2387 | "@" (message-make-fqdn) ">")) | 2447 | "@" (message-make-fqdn) ">")) |
| 2388 | 2448 | ||
| @@ -2468,9 +2528,10 @@ to find out how to use this." | |||
| 2468 | (let ((stop-pos | 2528 | (let ((stop-pos |
| 2469 | (string-match " *at \\| *@ \\| *(\\| *<" from))) | 2529 | (string-match " *at \\| *@ \\| *(\\| *<" from))) |
| 2470 | (concat (if stop-pos (substring from 0 stop-pos) from) | 2530 | (concat (if stop-pos (substring from 0 stop-pos) from) |
| 2471 | "'s message of " | 2531 | "'s message of \"" |
| 2472 | (if (or (not date) (string= date "")) | 2532 | (if (or (not date) (string= date "")) |
| 2473 | "(unknown date)" date))))))) | 2533 | "(unknown date)" date) |
| 2534 | "\"")))))) | ||
| 2474 | 2535 | ||
| 2475 | (defun message-make-distribution () | 2536 | (defun message-make-distribution () |
| 2476 | "Make a Distribution header." | 2537 | "Make a Distribution header." |
| @@ -2633,6 +2694,8 @@ Headers already prepared in the buffer are not modified." | |||
| 2633 | header value elem) | 2694 | header value elem) |
| 2634 | ;; First we remove any old generated headers. | 2695 | ;; First we remove any old generated headers. |
| 2635 | (let ((headers message-deletable-headers)) | 2696 | (let ((headers message-deletable-headers)) |
| 2697 | (unless (buffer-modified-p) | ||
| 2698 | (setq headers (delq 'Message-ID (copy-sequence headers)))) | ||
| 2636 | (while headers | 2699 | (while headers |
| 2637 | (goto-char (point-min)) | 2700 | (goto-char (point-min)) |
| 2638 | (and (re-search-forward | 2701 | (and (re-search-forward |
| @@ -2939,6 +3002,7 @@ Headers already prepared in the buffer are not modified." | |||
| 2939 | (message-narrow-to-headers) | 3002 | (message-narrow-to-headers) |
| 2940 | (run-hooks 'message-header-setup-hook)) | 3003 | (run-hooks 'message-header-setup-hook)) |
| 2941 | (set-buffer-modified-p nil) | 3004 | (set-buffer-modified-p nil) |
| 3005 | (setq buffer-undo-list nil) | ||
| 2942 | (run-hooks 'message-setup-hook) | 3006 | (run-hooks 'message-setup-hook) |
| 2943 | (message-position-point) | 3007 | (message-position-point) |
| 2944 | (undo-boundary)) | 3008 | (undo-boundary)) |
| @@ -2951,7 +3015,11 @@ Headers already prepared in the buffer are not modified." | |||
| 2951 | (let ((name (make-temp-name | 3015 | (let ((name (make-temp-name |
| 2952 | (expand-file-name | 3016 | (expand-file-name |
| 2953 | (concat (file-name-as-directory message-autosave-directory) | 3017 | (concat (file-name-as-directory message-autosave-directory) |
| 2954 | "msg."))))) | 3018 | "msg." |
| 3019 | (nnheader-replace-chars-in-string | ||
| 3020 | (nnheader-replace-chars-in-string | ||
| 3021 | (buffer-name) ?* ?.) | ||
| 3022 | ?/ ?-)))))) | ||
| 2955 | (setq buffer-auto-save-file-name | 3023 | (setq buffer-auto-save-file-name |
| 2956 | (save-excursion | 3024 | (save-excursion |
| 2957 | (prog1 | 3025 | (prog1 |
| @@ -3246,9 +3314,10 @@ responses here are directed to other newsgroups.")) | |||
| 3246 | mail-header-separator "\n" | 3314 | mail-header-separator "\n" |
| 3247 | message-cancel-message) | 3315 | message-cancel-message) |
| 3248 | (message "Canceling your article...") | 3316 | (message "Canceling your article...") |
| 3249 | (let ((message-syntax-checks 'dont-check-for-anything-just-trust-me)) | 3317 | (if (let ((message-syntax-checks |
| 3250 | (funcall message-send-news-function)) | 3318 | 'dont-check-for-anything-just-trust-me)) |
| 3251 | (message "Canceling your article...done") | 3319 | (funcall message-send-news-function)) |
| 3320 | (message "Canceling your article...done")) | ||
| 3252 | (kill-buffer buf))))) | 3321 | (kill-buffer buf))))) |
| 3253 | 3322 | ||
| 3254 | ;;;###autoload | 3323 | ;;;###autoload |
| @@ -3576,14 +3645,15 @@ Do a `tab-to-tab-stop' if not in those headers." | |||
| 3576 | (insert string) | 3645 | (insert string) |
| 3577 | (if (not comp) | 3646 | (if (not comp) |
| 3578 | (message "No matching groups") | 3647 | (message "No matching groups") |
| 3579 | (pop-to-buffer "*Completions*") | 3648 | (save-selected-window |
| 3580 | (buffer-disable-undo (current-buffer)) | 3649 | (pop-to-buffer "*Completions*") |
| 3581 | (let ((buffer-read-only nil)) | 3650 | (buffer-disable-undo (current-buffer)) |
| 3582 | (erase-buffer) | 3651 | (let ((buffer-read-only nil)) |
| 3583 | (let ((standard-output (current-buffer))) | 3652 | (erase-buffer) |
| 3584 | (display-completion-list (sort completions 'string<))) | 3653 | (let ((standard-output (current-buffer))) |
| 3585 | (goto-char (point-min)) | 3654 | (display-completion-list (sort completions 'string<))) |
| 3586 | (pop-to-buffer cur))))))) | 3655 | (goto-char (point-min)) |
| 3656 | (delete-region (point) (progn (forward-line 3) (point)))))))))) | ||
| 3587 | 3657 | ||
| 3588 | ;;; Help stuff. | 3658 | ;;; Help stuff. |
| 3589 | 3659 | ||
| @@ -3617,19 +3687,27 @@ The following arguments may contain lists of values." | |||
| 3617 | Then clone the local variables and values from the old buffer to the | 3687 | Then clone the local variables and values from the old buffer to the |
| 3618 | new one, cloning only the locals having a substring matching the | 3688 | new one, cloning only the locals having a substring matching the |
| 3619 | regexp varstr." | 3689 | regexp varstr." |
| 3620 | (let ((oldlocals (buffer-local-variables))) | 3690 | (let ((oldbuf (current-buffer))) |
| 3621 | (save-excursion | 3691 | (save-excursion |
| 3622 | (set-buffer (generate-new-buffer name)) | 3692 | (set-buffer (generate-new-buffer name)) |
| 3623 | (mapcar (lambda (dude) | 3693 | (message-clone-locals oldbuf) |
| 3624 | (when (and (car dude) | ||
| 3625 | (or (not varstr) | ||
| 3626 | (string-match varstr (symbol-name (car dude))))) | ||
| 3627 | (ignore-errors | ||
| 3628 | (set (make-local-variable (car dude)) | ||
| 3629 | (cdr dude))))) | ||
| 3630 | oldlocals) | ||
| 3631 | (current-buffer)))) | 3694 | (current-buffer)))) |
| 3632 | 3695 | ||
| 3696 | (defun message-clone-locals (buffer) | ||
| 3697 | "Clone the local variables from BUFFER to the current buffer." | ||
| 3698 | (let ((locals (save-excursion | ||
| 3699 | (set-buffer buffer) | ||
| 3700 | (buffer-local-variables))) | ||
| 3701 | (regexp "^gnus\\|^nn\\|^message")) | ||
| 3702 | (mapcar | ||
| 3703 | (lambda (local) | ||
| 3704 | (when (and (car local) | ||
| 3705 | (string-match regexp (symbol-name (car local)))) | ||
| 3706 | (ignore-errors | ||
| 3707 | (set (make-local-variable (car local)) | ||
| 3708 | (cdr local))))) | ||
| 3709 | locals))) | ||
| 3710 | |||
| 3633 | (run-hooks 'message-load-hook) | 3711 | (run-hooks 'message-load-hook) |
| 3634 | 3712 | ||
| 3635 | (provide 'message) | 3713 | (provide 'message) |
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index e7817e3af51..d4fea3e0510 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el | |||
| @@ -276,7 +276,8 @@ time saver for large mailboxes.") | |||
| 276 | (when group | 276 | (when group |
| 277 | (unless (assoc group nnfolder-group-alist) | 277 | (unless (assoc group nnfolder-group-alist) |
| 278 | (push (list group (cons 1 0)) nnfolder-group-alist) | 278 | (push (list group (cons 1 0)) nnfolder-group-alist) |
| 279 | (nnmail-save-active nnfolder-group-alist nnfolder-active-file))) | 279 | (nnmail-save-active nnfolder-group-alist nnfolder-active-file) |
| 280 | (nnfolder-read-folder group))) | ||
| 280 | t) | 281 | t) |
| 281 | 282 | ||
| 282 | (deffoo nnfolder-request-list (&optional server) | 283 | (deffoo nnfolder-request-list (&optional server) |
| @@ -451,6 +452,11 @@ time saver for large mailboxes.") | |||
| 451 | (kill-buffer (current-buffer)) | 452 | (kill-buffer (current-buffer)) |
| 452 | t)))) | 453 | t)))) |
| 453 | 454 | ||
| 455 | (defun nnfolder-request-regenerate (server) | ||
| 456 | (nnfolder-possibly-change-group nil server) | ||
| 457 | (nnfolder-generate-active-file) | ||
| 458 | t) | ||
| 459 | |||
| 454 | 460 | ||
| 455 | ;;; Internal functions. | 461 | ;;; Internal functions. |
| 456 | 462 | ||
| @@ -503,8 +509,6 @@ time saver for large mailboxes.") | |||
| 503 | ;; Change group. | 509 | ;; Change group. |
| 504 | (when (and group | 510 | (when (and group |
| 505 | (not (equal group nnfolder-current-group))) | 511 | (not (equal group nnfolder-current-group))) |
| 506 | ;; 1997/8/14 by MORIOKA Tomohiko | ||
| 507 | ;; for XEmacs/mule. | ||
| 508 | (let ((pathname-coding-system 'binary)) | 512 | (let ((pathname-coding-system 'binary)) |
| 509 | (nnmail-activate 'nnfolder) | 513 | (nnmail-activate 'nnfolder) |
| 510 | (when (and (not (assoc group nnfolder-group-alist)) | 514 | (when (and (not (assoc group nnfolder-group-alist)) |
| @@ -513,16 +517,17 @@ time saver for large mailboxes.") | |||
| 513 | ;; The group doesn't exist, so we create a new entry for it. | 517 | ;; The group doesn't exist, so we create a new entry for it. |
| 514 | (push (list group (cons 1 0)) nnfolder-group-alist) | 518 | (push (list group (cons 1 0)) nnfolder-group-alist) |
| 515 | (nnmail-save-active nnfolder-group-alist nnfolder-active-file)) | 519 | (nnmail-save-active nnfolder-group-alist nnfolder-active-file)) |
| 516 | 520 | ||
| 517 | (if dont-check | 521 | (if dont-check |
| 518 | (setq nnfolder-current-group group) | 522 | (setq nnfolder-current-group group |
| 523 | nnfolder-current-buffer nil) | ||
| 519 | (let (inf file) | 524 | (let (inf file) |
| 520 | ;; If we have to change groups, see if we don't already have the | 525 | ;; If we have to change groups, see if we don't already have the |
| 521 | ;; folder in memory. If we do, verify the modtime and destroy | 526 | ;; folder in memory. If we do, verify the modtime and destroy |
| 522 | ;; the folder if needed so we can rescan it. | 527 | ;; the folder if needed so we can rescan it. |
| 523 | (when (setq inf (assoc group nnfolder-buffer-alist)) | 528 | (setq nnfolder-current-buffer |
| 524 | (setq nnfolder-current-buffer (nth 1 inf))) | 529 | (nth 1 (assoc group nnfolder-buffer-alist))) |
| 525 | 530 | ||
| 526 | ;; If the buffer is not live, make sure it isn't in the alist. If it | 531 | ;; If the buffer is not live, make sure it isn't in the alist. If it |
| 527 | ;; is live, verify that nobody else has touched the file since last | 532 | ;; is live, verify that nobody else has touched the file since last |
| 528 | ;; time. | 533 | ;; time. |
| @@ -530,9 +535,9 @@ time saver for large mailboxes.") | |||
| 530 | (not (gnus-buffer-live-p nnfolder-current-buffer))) | 535 | (not (gnus-buffer-live-p nnfolder-current-buffer))) |
| 531 | (setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist) | 536 | (setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist) |
| 532 | nnfolder-current-buffer nil)) | 537 | nnfolder-current-buffer nil)) |
| 533 | 538 | ||
| 534 | (setq nnfolder-current-group group) | 539 | (setq nnfolder-current-group group) |
| 535 | 540 | ||
| 536 | (when (or (not nnfolder-current-buffer) | 541 | (when (or (not nnfolder-current-buffer) |
| 537 | (not (verify-visited-file-modtime nnfolder-current-buffer))) | 542 | (not (verify-visited-file-modtime nnfolder-current-buffer))) |
| 538 | (save-excursion | 543 | (save-excursion |
| @@ -758,9 +763,7 @@ time saver for large mailboxes.") | |||
| 758 | 763 | ||
| 759 | (defun nnfolder-group-pathname (group) | 764 | (defun nnfolder-group-pathname (group) |
| 760 | "Make pathname for GROUP." | 765 | "Make pathname for GROUP." |
| 761 | ;; 1997/8/14 by MORIOKA Tomohiko | 766 | (setq group (gnus-encode-coding-string group nnmail-pathname-coding-system)) |
| 762 | ;; encode file name for Emacs 20. | ||
| 763 | (setq group (encode-coding-string group nnmail-pathname-coding-system)) | ||
| 764 | (let ((dir (file-name-as-directory (expand-file-name nnfolder-directory)))) | 767 | (let ((dir (file-name-as-directory (expand-file-name nnfolder-directory)))) |
| 765 | ;; If this file exists, we use it directly. | 768 | ;; If this file exists, we use it directly. |
| 766 | (if (or nnmail-use-long-file-names | 769 | (if (or nnmail-use-long-file-names |
| @@ -773,6 +776,7 @@ time saver for large mailboxes.") | |||
| 773 | "Save the buffer." | 776 | "Save the buffer." |
| 774 | (when (buffer-modified-p) | 777 | (when (buffer-modified-p) |
| 775 | (run-hooks 'nnfolder-save-buffer-hook) | 778 | (run-hooks 'nnfolder-save-buffer-hook) |
| 779 | (gnus-make-directory (file-name-directory (buffer-file-name))) | ||
| 776 | (save-buffer))) | 780 | (save-buffer))) |
| 777 | 781 | ||
| 778 | (provide 'nnfolder) | 782 | (provide 'nnfolder) |
diff --git a/lisp/gnus/nngateway.el b/lisp/gnus/nngateway.el index 0cfd893c012..28fd245692b 100644 --- a/lisp/gnus/nngateway.el +++ b/lisp/gnus/nngateway.el | |||
| @@ -58,9 +58,11 @@ parameter -- the gateway address.") | |||
| 58 | (insert-buffer-substring buf) | 58 | (insert-buffer-substring buf) |
| 59 | (message-narrow-to-head) | 59 | (message-narrow-to-head) |
| 60 | (funcall nngateway-header-transformation nngateway-address) | 60 | (funcall nngateway-header-transformation nngateway-address) |
| 61 | (goto-char (point-max)) | ||
| 62 | (insert mail-header-separator "\n") | ||
| 61 | (widen) | 63 | (widen) |
| 62 | (let (message-required-mail-headers) | 64 | (let (message-required-mail-headers) |
| 63 | (message-send-mail)))))) | 65 | (funcall message-send-mail-function)))))) |
| 64 | 66 | ||
| 65 | ;;; Internal functions | 67 | ;;; Internal functions |
| 66 | 68 | ||
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index a137b3fb0b1..448fb8252e1 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el | |||
| @@ -683,9 +683,7 @@ without formatting." | |||
| 683 | (concat dir group "/") | 683 | (concat dir group "/") |
| 684 | ;; If not, we translate dots into slashes. | 684 | ;; If not, we translate dots into slashes. |
| 685 | (concat dir | 685 | (concat dir |
| 686 | ;; 1997/8/10 by MORIOKA Tomohiko | 686 | (gnus-encode-coding-string |
| 687 | ;; encode file name for Emacs 20. | ||
| 688 | (encode-coding-string | ||
| 689 | (nnheader-replace-chars-in-string group ?. ?/) | 687 | (nnheader-replace-chars-in-string group ?. ?/) |
| 690 | nnheader-pathname-coding-system) | 688 | nnheader-pathname-coding-system) |
| 691 | "/"))) | 689 | "/"))) |
diff --git a/lisp/gnus/nnkiboze.el b/lisp/gnus/nnkiboze.el index 6fba5d08b45..971d74a8f2e 100644 --- a/lisp/gnus/nnkiboze.el +++ b/lisp/gnus/nnkiboze.el | |||
| @@ -154,7 +154,9 @@ | |||
| 154 | (nnkiboze-possibly-change-group group) | 154 | (nnkiboze-possibly-change-group group) |
| 155 | (when force | 155 | (when force |
| 156 | (let ((files (list (nnkiboze-nov-file-name) | 156 | (let ((files (list (nnkiboze-nov-file-name) |
| 157 | (concat nnkiboze-directory group ".newsrc") | 157 | (concat nnkiboze-directory |
| 158 | (nnheader-translate-file-chars | ||
| 159 | (concat group ".newsrc"))) | ||
| 158 | (nnkiboze-score-file group)))) | 160 | (nnkiboze-score-file group)))) |
| 159 | (while files | 161 | (while files |
| 160 | (and (file-exists-p (car files)) | 162 | (and (file-exists-p (car files)) |
| @@ -205,8 +207,12 @@ Finds out what articles are to be part of the nnkiboze groups." | |||
| 205 | 207 | ||
| 206 | (defun nnkiboze-generate-group (group) | 208 | (defun nnkiboze-generate-group (group) |
| 207 | (let* ((info (nth 2 (gnus-gethash group gnus-newsrc-hashtb))) | 209 | (let* ((info (nth 2 (gnus-gethash group gnus-newsrc-hashtb))) |
| 208 | (newsrc-file (concat nnkiboze-directory group ".newsrc")) | 210 | (newsrc-file (concat nnkiboze-directory |
| 209 | (nov-file (concat nnkiboze-directory group ".nov")) | 211 | (nnheader-translate-file-chars |
| 212 | (concat group ".newsrc")))) | ||
| 213 | (nov-file (concat nnkiboze-directory | ||
| 214 | (nnheader-translate-file-chars | ||
| 215 | (concat group ".nov")))) | ||
| 210 | method nnkiboze-newsrc gname newsrc active | 216 | method nnkiboze-newsrc gname newsrc active |
| 211 | ginfo lowest glevel orig-info nov-buffer | 217 | ginfo lowest glevel orig-info nov-buffer |
| 212 | ;; Bind various things to nil to make group entry faster. | 218 | ;; Bind various things to nil to make group entry faster. |
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 9c49843474d..295e2f2b3ac 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el | |||
| @@ -113,7 +113,9 @@ If nil, the first match found will be used." | |||
| 113 | 113 | ||
| 114 | ;; Added by gord@enci.ucalgary.ca (Gordon Matzigkeit). | 114 | ;; Added by gord@enci.ucalgary.ca (Gordon Matzigkeit). |
| 115 | (defcustom nnmail-keep-last-article nil | 115 | (defcustom nnmail-keep-last-article nil |
| 116 | "If non-nil, nnmail will never delete the last expired article in a directory. | 116 | "If non-nil, nnmail will never delete/move a group's last article. |
| 117 | It can be marked expirable, so it will be deleted when it is no longer last. | ||
| 118 | |||
| 117 | You may need to set this variable if other programs are putting | 119 | You may need to set this variable if other programs are putting |
| 118 | new mail into folder numbers that Gnus has marked as expired." | 120 | new mail into folder numbers that Gnus has marked as expired." |
| 119 | :group 'nnmail-procmail | 121 | :group 'nnmail-procmail |
| @@ -396,7 +398,9 @@ Example: | |||
| 396 | '((any . "from\\|to\\|cc\\|sender\\|apparently-to\\|resent-from\\|resent-to\\|resent-cc") | 398 | '((any . "from\\|to\\|cc\\|sender\\|apparently-to\\|resent-from\\|resent-to\\|resent-cc") |
| 397 | (mail . "mailer-daemon\\|postmaster\\|uucp") | 399 | (mail . "mailer-daemon\\|postmaster\\|uucp") |
| 398 | (to . "to\\|cc\\|apparently-to\\|resent-to\\|resent-cc") | 400 | (to . "to\\|cc\\|apparently-to\\|resent-to\\|resent-cc") |
| 399 | (from . "from\\|sender\\|resent-from")) | 401 | (from . "from\\|sender\\|resent-from") |
| 402 | (nato . "to\\|cc\\|resent-to\\|resent-cc") | ||
| 403 | (naany . "from\\|to\\|cc\\|sender\\|resent-from\\|resent-to\\|resent-cc")) | ||
| 400 | "Alist of abbreviations allowed in `nnmail-split-fancy'." | 404 | "Alist of abbreviations allowed in `nnmail-split-fancy'." |
| 401 | :group 'nnmail-split | 405 | :group 'nnmail-split |
| 402 | :type '(repeat (cons :format "%v" symbol regexp))) | 406 | :type '(repeat (cons :format "%v" symbol regexp))) |
| @@ -505,9 +509,7 @@ parameter. It should return nil, `warn' or `delete'." | |||
| 505 | (concat dir group "/") | 509 | (concat dir group "/") |
| 506 | ;; If not, we translate dots into slashes. | 510 | ;; If not, we translate dots into slashes. |
| 507 | (concat dir | 511 | (concat dir |
| 508 | ;; 1997/8/10 by MORIOKA Tomohiko | 512 | (gnus-encode-coding-string |
| 509 | ;; encode file name for Emacs 20. | ||
| 510 | (encode-coding-string | ||
| 511 | (nnheader-replace-chars-in-string group ?. ?/) | 513 | (nnheader-replace-chars-in-string group ?. ?/) |
| 512 | nnmail-pathname-coding-system) | 514 | nnmail-pathname-coding-system) |
| 513 | "/"))) | 515 | "/"))) |
| @@ -559,18 +561,17 @@ parameter. It should return nil, `warn' or `delete'." | |||
| 559 | (defun nnmail-move-inbox (inbox) | 561 | (defun nnmail-move-inbox (inbox) |
| 560 | "Move INBOX to `nnmail-crash-box'." | 562 | "Move INBOX to `nnmail-crash-box'." |
| 561 | (if (not (file-writable-p nnmail-crash-box)) | 563 | (if (not (file-writable-p nnmail-crash-box)) |
| 562 | (gnus-error 1 "Can't write to crash box %s. Not moving mail." | 564 | (gnus-error 1 "Can't write to crash box %s. Not moving mail" |
| 563 | nnmail-crash-box) | 565 | nnmail-crash-box) |
| 564 | ;; If the crash box exists and is empty, we delete it. | 566 | ;; If the crash box exists and is empty, we delete it. |
| 565 | (when (and (file-exists-p nnmail-crash-box) | 567 | (when (and (file-exists-p nnmail-crash-box) |
| 566 | (zerop (nnheader-file-size (file-truename nnmail-crash-box)))) | 568 | (zerop (nnheader-file-size (file-truename nnmail-crash-box)))) |
| 567 | (delete-file nnmail-crash-box)) | 569 | (delete-file nnmail-crash-box)) |
| 568 | (let ((inbox (file-truename (expand-file-name inbox))) | 570 | (let ((tofile (file-truename (expand-file-name nnmail-crash-box))) |
| 569 | (tofile (file-truename (expand-file-name nnmail-crash-box))) | 571 | (popmail (string-match "^po:" inbox)) |
| 570 | movemail popmail errors result) | 572 | movemail errors result) |
| 571 | (if (setq popmail (string-match | 573 | (unless popmail |
| 572 | "^po:" (file-name-nondirectory inbox))) | 574 | (setq inbox (file-truename (expand-file-name inbox))) |
| 573 | (setq inbox (file-name-nondirectory inbox)) | ||
| 574 | (setq movemail t) | 575 | (setq movemail t) |
| 575 | ;; On some systems, /usr/spool/mail/foo is a directory | 576 | ;; On some systems, /usr/spool/mail/foo is a directory |
| 576 | ;; and the actual inbox is /usr/spool/mail/foo/foo. | 577 | ;; and the actual inbox is /usr/spool/mail/foo/foo. |
| @@ -590,7 +591,7 @@ parameter. It should return nil, `warn' or `delete'." | |||
| 590 | (nnmail-read-passwd | 591 | (nnmail-read-passwd |
| 591 | (format "Password for %s: " | 592 | (format "Password for %s: " |
| 592 | (substring inbox (+ popmail 3)))))) | 593 | (substring inbox (+ popmail 3)))))) |
| 593 | (message "Getting mail from post office ...")) | 594 | (message "Getting mail from the post office...")) |
| 594 | (when (or (and (file-exists-p tofile) | 595 | (when (or (and (file-exists-p tofile) |
| 595 | (/= 0 (nnheader-file-size tofile))) | 596 | (/= 0 (nnheader-file-size tofile))) |
| 596 | (and (file-exists-p inbox) | 597 | (and (file-exists-p inbox) |
| @@ -831,7 +832,7 @@ is a spool. If not using procmail, return GROUP." | |||
| 831 | (= (following-char) ?\n))) | 832 | (= (following-char) ?\n))) |
| 832 | (save-excursion | 833 | (save-excursion |
| 833 | (forward-line 1) | 834 | (forward-line 1) |
| 834 | (while (looking-at ">From ") | 835 | (while (looking-at ">From \\|From ") |
| 835 | (forward-line 1)) | 836 | (forward-line 1)) |
| 836 | (looking-at "[^ \n\t:]+[ \n\t]*:"))) | 837 | (looking-at "[^ \n\t:]+[ \n\t]*:"))) |
| 837 | (setq found 'yes))))) | 838 | (setq found 'yes))))) |
| @@ -860,7 +861,7 @@ is a spool. If not using procmail, return GROUP." | |||
| 860 | (= (following-char) ?\n))) | 861 | (= (following-char) ?\n))) |
| 861 | (save-excursion | 862 | (save-excursion |
| 862 | (forward-line 1) | 863 | (forward-line 1) |
| 863 | (while (looking-at ">From ") | 864 | (while (looking-at ">From \\|From ") |
| 864 | (forward-line 1)) | 865 | (forward-line 1)) |
| 865 | (looking-at "[^ \n\t:]+[ \n\t]*:"))) | 866 | (looking-at "[^ \n\t:]+[ \n\t]*:"))) |
| 866 | (setq found 'yes))))) | 867 | (setq found 'yes))))) |
| @@ -1069,6 +1070,9 @@ FUNC will be called with the group name to determine the article number." | |||
| 1069 | (fboundp nnmail-split-methods)) | 1070 | (fboundp nnmail-split-methods)) |
| 1070 | (let ((split | 1071 | (let ((split |
| 1071 | (condition-case nil | 1072 | (condition-case nil |
| 1073 | ;; `nnmail-split-methods' is a function, so we | ||
| 1074 | ;; just call this function here and use the | ||
| 1075 | ;; result. | ||
| 1072 | (or (funcall nnmail-split-methods) | 1076 | (or (funcall nnmail-split-methods) |
| 1073 | '("bogus")) | 1077 | '("bogus")) |
| 1074 | (error | 1078 | (error |
| @@ -1076,9 +1080,13 @@ FUNC will be called with the group name to determine the article number." | |||
| 1076 | "Error in `nnmail-split-methods'; using `bogus' mail group") | 1080 | "Error in `nnmail-split-methods'; using `bogus' mail group") |
| 1077 | (sit-for 1) | 1081 | (sit-for 1) |
| 1078 | '("bogus"))))) | 1082 | '("bogus"))))) |
| 1079 | (unless (equal split '(junk)) | 1083 | ;; The article may be "cross-posted" to `junk'. What |
| 1080 | ;; `nnmail-split-methods' is a function, so we just call | 1084 | ;; to do? Just remove the `junk' spec. Don't really |
| 1081 | ;; this function here and use the result. | 1085 | ;; see anything else to do... |
| 1086 | (let (elem) | ||
| 1087 | (while (setq elem (car (memq 'junk split))) | ||
| 1088 | (setq split (delq elem split)))) | ||
| 1089 | (when split | ||
| 1082 | (setq group-art | 1090 | (setq group-art |
| 1083 | (mapcar | 1091 | (mapcar |
| 1084 | (lambda (group) (cons group (funcall func group))) | 1092 | (lambda (group) (cons group (funcall func group))) |
| @@ -1109,7 +1117,13 @@ FUNC will be called with the group name to determine the article number." | |||
| 1109 | ;; See whether the split methods returned `junk'. | 1117 | ;; See whether the split methods returned `junk'. |
| 1110 | (if (equal group-art '(junk)) | 1118 | (if (equal group-art '(junk)) |
| 1111 | nil | 1119 | nil |
| 1112 | (nreverse (delq 'junk group-art))))))) | 1120 | ;; The article may be "cross-posted" to `junk'. What |
| 1121 | ;; to do? Just remove the `junk' spec. Don't really | ||
| 1122 | ;; see anything else to do... | ||
| 1123 | (let (elem) | ||
| 1124 | (while (setq elem (car (memq 'junk group-art))) | ||
| 1125 | (setq group-art (delq elem group-art))) | ||
| 1126 | (nreverse group-art))))))) | ||
| 1113 | 1127 | ||
| 1114 | (defun nnmail-insert-lines () | 1128 | (defun nnmail-insert-lines () |
| 1115 | "Insert how many lines there are in the body of the mail. | 1129 | "Insert how many lines there are in the body of the mail. |
| @@ -1139,10 +1153,8 @@ Return the number of characters in the body." | |||
| 1139 | (progn (forward-line 1) (point)))) | 1153 | (progn (forward-line 1) (point)))) |
| 1140 | (insert (format "Xref: %s" (system-name))) | 1154 | (insert (format "Xref: %s" (system-name))) |
| 1141 | (while group-alist | 1155 | (while group-alist |
| 1142 | ;; 1997/8/10 by MORIOKA Tomohiko | ||
| 1143 | ;; encode file name for Emacs 20. | ||
| 1144 | (insert (format " %s:%d" | 1156 | (insert (format " %s:%d" |
| 1145 | (encode-coding-string (caar group-alist) | 1157 | (gnus-encode-coding-string (caar group-alist) |
| 1146 | nnmail-pathname-coding-system) | 1158 | nnmail-pathname-coding-system) |
| 1147 | (cdar group-alist))) | 1159 | (cdar group-alist))) |
| 1148 | (setq group-alist (cdr group-alist))) | 1160 | (setq group-alist (cdr group-alist))) |
diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el index f1938586141..48c0ea2e139 100644 --- a/lisp/gnus/nnmh.el +++ b/lisp/gnus/nnmh.el | |||
| @@ -190,11 +190,9 @@ | |||
| 190 | 190 | ||
| 191 | (deffoo nnmh-request-list (&optional server dir) | 191 | (deffoo nnmh-request-list (&optional server dir) |
| 192 | (nnheader-insert "") | 192 | (nnheader-insert "") |
| 193 | (let (;; 1997/8/14 by MORIOKA Tomohiko | 193 | (let ((pathname-coding-system 'binary) |
| 194 | ;; for XEmacs/mule. | ||
| 195 | (pathname-coding-system 'binary) | ||
| 196 | (nnmh-toplev | 194 | (nnmh-toplev |
| 197 | (or dir (file-truename (file-name-as-directory nnmh-directory))))) | 195 | (file-truename (or dir (file-name-as-directory nnmh-directory))))) |
| 198 | (nnmh-request-list-1 nnmh-toplev)) | 196 | (nnmh-request-list-1 nnmh-toplev)) |
| 199 | (setq nnmh-group-alist (nnmail-get-active)) | 197 | (setq nnmh-group-alist (nnmail-get-active)) |
| 200 | t) | 198 | t) |
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index e1986a7ba9d..3cfd12bb374 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | (nnoo-declare nnml) | 38 | (nnoo-declare nnml) |
| 39 | 39 | ||
| 40 | (defvoo nnml-directory message-directory | 40 | (defvoo nnml-directory message-directory |
| 41 | "Mail spool directory.") | 41 | "Spool directory for the nnml mail backend.") |
| 42 | 42 | ||
| 43 | (defvoo nnml-active-file | 43 | (defvoo nnml-active-file |
| 44 | (concat (file-name-as-directory nnml-directory) "active") | 44 | (concat (file-name-as-directory nnml-directory) "active") |
| @@ -474,8 +474,15 @@ all. This may very well take some time.") | |||
| 474 | (defun nnml-article-to-file (article) | 474 | (defun nnml-article-to-file (article) |
| 475 | (nnml-update-file-alist) | 475 | (nnml-update-file-alist) |
| 476 | (let (file) | 476 | (let (file) |
| 477 | (when (setq file (cdr (assq article nnml-article-file-alist))) | 477 | (if (setq file (cdr (assq article nnml-article-file-alist))) |
| 478 | (concat nnml-current-directory file)))) | 478 | (concat nnml-current-directory file) |
| 479 | ;; Just to make sure nothing went wrong when reading over NFS -- | ||
| 480 | ;; check once more. | ||
| 481 | (when (file-exists-p | ||
| 482 | (setq file (concat nnml-current-directory "/" | ||
| 483 | (number-to-string article)))) | ||
| 484 | (nnml-update-file-alist t) | ||
| 485 | file)))) | ||
| 479 | 486 | ||
| 480 | (defun nnml-deletable-article-p (group article) | 487 | (defun nnml-deletable-article-p (group article) |
| 481 | "Say whether ARTICLE in GROUP can be deleted." | 488 | "Say whether ARTICLE in GROUP can be deleted." |
| @@ -769,8 +776,7 @@ all. This may very well take some time.") | |||
| 769 | (search-forward "\n\n" nil t) | 776 | (search-forward "\n\n" nil t) |
| 770 | (setq chars (- (point-max) (point))) | 777 | (setq chars (- (point-max) (point))) |
| 771 | (max 1 (1- (point))))) | 778 | (max 1 (1- (point))))) |
| 772 | (when (and (not (= 0 chars)) ; none of them empty files... | 779 | (unless (zerop (buffer-size)) |
| 773 | (not (= (point-min) (point-max)))) | ||
| 774 | (goto-char (point-min)) | 780 | (goto-char (point-min)) |
| 775 | (setq headers (nnml-parse-head chars (caar files))) | 781 | (setq headers (nnml-parse-head chars (caar files))) |
| 776 | (save-excursion | 782 | (save-excursion |
| @@ -800,8 +806,9 @@ all. This may very well take some time.") | |||
| 800 | (setf (car active) num))))))) | 806 | (setf (car active) num))))))) |
| 801 | t)) | 807 | t)) |
| 802 | 808 | ||
| 803 | (defun nnml-update-file-alist () | 809 | (defun nnml-update-file-alist (&optional force) |
| 804 | (unless nnml-article-file-alist | 810 | (when (or (not nnml-article-file-alist) |
| 811 | force) | ||
| 805 | (setq nnml-article-file-alist | 812 | (setq nnml-article-file-alist |
| 806 | (nnheader-article-to-file-alist nnml-current-directory)))) | 813 | (nnheader-article-to-file-alist nnml-current-directory)))) |
| 807 | 814 | ||
diff --git a/lisp/gnus/nnoo.el b/lisp/gnus/nnoo.el index 2f93502215c..d2f271f5c55 100644 --- a/lisp/gnus/nnoo.el +++ b/lisp/gnus/nnoo.el | |||
| @@ -143,7 +143,7 @@ | |||
| 143 | (def (assq backend nnoo-definition-alist)) | 143 | (def (assq backend nnoo-definition-alist)) |
| 144 | (parents (nth 1 def))) | 144 | (parents (nth 1 def))) |
| 145 | (unless def | 145 | (unless def |
| 146 | (error "%s belongs to a backend that hasn't been declared." var)) | 146 | (error "%s belongs to a backend that hasn't been declared" var)) |
| 147 | (setcar (nthcdr 2 def) | 147 | (setcar (nthcdr 2 def) |
| 148 | (delq (assq var (nth 2 def)) (nth 2 def))) | 148 | (delq (assq var (nth 2 def)) (nth 2 def))) |
| 149 | (setcar (nthcdr 2 def) | 149 | (setcar (nthcdr 2 def) |
diff --git a/lisp/gnus/nnsoup.el b/lisp/gnus/nnsoup.el index 7088c649d68..31335352e21 100644 --- a/lisp/gnus/nnsoup.el +++ b/lisp/gnus/nnsoup.el | |||
| @@ -237,7 +237,7 @@ The SOUP packet file name will be inserted at the %s.") | |||
| 237 | 237 | ||
| 238 | (deffoo nnsoup-request-type (group &optional article) | 238 | (deffoo nnsoup-request-type (group &optional article) |
| 239 | (nnsoup-possibly-change-group group) | 239 | (nnsoup-possibly-change-group group) |
| 240 | ;; Try to guess the type based on the first articl ein the group. | 240 | ;; Try to guess the type based on the first article in the group. |
| 241 | (when (not article) | 241 | (when (not article) |
| 242 | (setq article | 242 | (setq article |
| 243 | (cdaar (cddr (assoc group nnsoup-group-alist))))) | 243 | (cdaar (cddr (assoc group nnsoup-group-alist))))) |
| @@ -623,7 +623,7 @@ The SOUP packet file name will be inserted at the %s.") | |||
| 623 | (nnsoup-write-replies) | 623 | (nnsoup-write-replies) |
| 624 | ;; Check whether there is anything here. | 624 | ;; Check whether there is anything here. |
| 625 | (when (null (directory-files nnsoup-replies-directory nil "\\.MSG$")) | 625 | (when (null (directory-files nnsoup-replies-directory nil "\\.MSG$")) |
| 626 | (error "No files to pack.")) | 626 | (error "No files to pack")) |
| 627 | ;; Pack all these files into a SOUP packet. | 627 | ;; Pack all these files into a SOUP packet. |
| 628 | (gnus-soup-pack nnsoup-replies-directory nnsoup-packer)) | 628 | (gnus-soup-pack nnsoup-replies-directory nnsoup-packer)) |
| 629 | 629 | ||
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 52fd0867477..0cca4cc32e6 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -73,10 +73,11 @@ It will be called with the buffer to output in. | |||
| 73 | 73 | ||
| 74 | Two pre-made functions are `nntp-open-network-stream', which is the | 74 | Two pre-made functions are `nntp-open-network-stream', which is the |
| 75 | default, and simply connects to some port or other on the remote | 75 | default, and simply connects to some port or other on the remote |
| 76 | system (see nntp-port-number). The other are `nntp-open-rlogin', which | 76 | system (see nntp-port-number). The other are `nntp-open-rlogin', |
| 77 | does an rlogin on the remote system, and then does a telnet to the | 77 | which does an rlogin on the remote system, and then does a telnet to |
| 78 | NNTP server available there (see nntp-rlogin-parameters) and `nntp-open-telnet' which | 78 | the NNTP server available there (see nntp-rlogin-parameters) and |
| 79 | telnets to a remote system, logs in and does the same") | 79 | `nntp-open-telnet' which telnets to a remote system, logs in and does |
| 80 | the same.") | ||
| 80 | 81 | ||
| 81 | (defvoo nntp-rlogin-parameters '("telnet" "-8" "${NNTPSERVER:=news}" "nntp") | 82 | (defvoo nntp-rlogin-parameters '("telnet" "-8" "${NNTPSERVER:=news}" "nntp") |
| 82 | "*Parameters to `nntp-open-login'. | 83 | "*Parameters to `nntp-open-login'. |
| @@ -98,6 +99,12 @@ via telnet.") | |||
| 98 | (defvoo nntp-telnet-passwd nil | 99 | (defvoo nntp-telnet-passwd nil |
| 99 | "Password to use to log in via telnet with.") | 100 | "Password to use to log in via telnet with.") |
| 100 | 101 | ||
| 102 | (defvoo nntp-telnet-command "telnet" | ||
| 103 | "Command used to start telnet.") | ||
| 104 | |||
| 105 | (defvoo nntp-telnet-switches '("-8") | ||
| 106 | "Switches given to the telnet command.") | ||
| 107 | |||
| 101 | (defvoo nntp-end-of-line "\r\n" | 108 | (defvoo nntp-end-of-line "\r\n" |
| 102 | "String to use on the end of lines when talking to the NNTP server. | 109 | "String to use on the end of lines when talking to the NNTP server. |
| 103 | This is \"\\r\\n\" by default, but should be \"\\n\" when | 110 | This is \"\\r\\n\" by default, but should be \"\\n\" when |
| @@ -122,7 +129,7 @@ The strings are tried in turn until a positive response is gotten. If | |||
| 122 | none of the commands are successful, nntp will just grab headers one | 129 | none of the commands are successful, nntp will just grab headers one |
| 123 | by one.") | 130 | by one.") |
| 124 | 131 | ||
| 125 | (defvoo nntp-nov-gap 20 | 132 | (defvoo nntp-nov-gap 5 |
| 126 | "*Maximum allowed gap between two articles. | 133 | "*Maximum allowed gap between two articles. |
| 127 | If the gap between two consecutive articles is bigger than this | 134 | If the gap between two consecutive articles is bigger than this |
| 128 | variable, split the XOVER request into two requests.") | 135 | variable, split the XOVER request into two requests.") |
| @@ -187,7 +194,7 @@ server there that you can connect to. See also `nntp-open-connection-function'" | |||
| 187 | (save-excursion | 194 | (save-excursion |
| 188 | (set-buffer (process-buffer process)) | 195 | (set-buffer (process-buffer process)) |
| 189 | (goto-char (point-min)) | 196 | (goto-char (point-min)) |
| 190 | (while (or (not (memq (following-char) '(?2 ?3 ?4 ?5))) | 197 | (while (or (not (memq (char-after (point)) '(?2 ?3 ?4 ?5))) |
| 191 | (looking-at "480")) | 198 | (looking-at "480")) |
| 192 | (when (looking-at "480") | 199 | (when (looking-at "480") |
| 193 | (erase-buffer) | 200 | (erase-buffer) |
| @@ -568,20 +575,22 @@ server there that you can connect to. See also `nntp-open-connection-function'" | |||
| 568 | (when (nntp-send-command-and-decode | 575 | (when (nntp-send-command-and-decode |
| 569 | "\r?\n\\.\r?\n" "ARTICLE" | 576 | "\r?\n\\.\r?\n" "ARTICLE" |
| 570 | (if (numberp article) (int-to-string article) article)) | 577 | (if (numberp article) (int-to-string article) article)) |
| 571 | (when (and buffer | 578 | (if (and buffer |
| 572 | (not (equal buffer nntp-server-buffer))) | 579 | (not (equal buffer nntp-server-buffer))) |
| 573 | (save-excursion | 580 | (save-excursion |
| 574 | (set-buffer nntp-server-buffer) | 581 | (set-buffer nntp-server-buffer) |
| 575 | (copy-to-buffer buffer (point-min) (point-max)) | 582 | (copy-to-buffer buffer (point-min) (point-max)) |
| 576 | (nntp-find-group-and-number))) | 583 | (nntp-find-group-and-number)) |
| 577 | (nntp-find-group-and-number))) | 584 | (nntp-find-group-and-number)))) |
| 578 | 585 | ||
| 579 | (deffoo nntp-request-head (article &optional group server) | 586 | (deffoo nntp-request-head (article &optional group server) |
| 580 | (nntp-possibly-change-group group server) | 587 | (nntp-possibly-change-group group server) |
| 581 | (when (nntp-send-command-and-decode | 588 | (when (nntp-send-command |
| 582 | "\r?\n\\.\r?\n" "HEAD" | 589 | "\r?\n\\.\r?\n" "HEAD" |
| 583 | (if (numberp article) (int-to-string article) article)) | 590 | (if (numberp article) (int-to-string article) article)) |
| 584 | (nntp-find-group-and-number))) | 591 | (prog1 |
| 592 | (nntp-find-group-and-number) | ||
| 593 | (nntp-decode-text)))) | ||
| 585 | 594 | ||
| 586 | (deffoo nntp-request-body (article &optional group server) | 595 | (deffoo nntp-request-body (article &optional group server) |
| 587 | (nntp-possibly-change-group group server) | 596 | (nntp-possibly-change-group group server) |
| @@ -1046,8 +1055,9 @@ This function is supposed to be called from `nntp-server-opened-hook'." | |||
| 1046 | (save-excursion | 1055 | (save-excursion |
| 1047 | (set-buffer buffer) | 1056 | (set-buffer buffer) |
| 1048 | (erase-buffer) | 1057 | (erase-buffer) |
| 1049 | (let ((proc (start-process | 1058 | (let ((proc (apply |
| 1050 | "nntpd" buffer "telnet" "-8")) | 1059 | 'start-process |
| 1060 | "nntpd" buffer nntp-telnet-command nntp-telnet-switches)) | ||
| 1051 | (case-fold-search t)) | 1061 | (case-fold-search t)) |
| 1052 | (when (memq (process-status proc) '(open run)) | 1062 | (when (memq (process-status proc) '(open run)) |
| 1053 | (process-send-string proc "set escape \^X\n") | 1063 | (process-send-string proc "set escape \^X\n") |
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index 05db7591112..aece7417cbc 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el | |||
| @@ -374,22 +374,29 @@ to virtual article number.") | |||
| 374 | 374 | ||
| 375 | (insert "Xref: " system-name " " group ":") | 375 | (insert "Xref: " system-name " " group ":") |
| 376 | (princ article (current-buffer)) | 376 | (princ article (current-buffer)) |
| 377 | (insert " ") | ||
| 377 | 378 | ||
| 378 | ;; If there were existing xref lines, clean them up to have the correct | 379 | ;; If there were existing xref lines, clean them up to have the correct |
| 379 | ;; component server prefix. | 380 | ;; component server prefix. |
| 380 | (let ((xref-end (save-excursion | 381 | (save-restriction |
| 381 | (search-forward "\t" (gnus-point-at-eol) 'move) | 382 | (narrow-to-region (point) |
| 382 | (point))) | 383 | (or (search-forward "\t" (gnus-point-at-eol) t) |
| 383 | (len (length prefix))) | 384 | (gnus-point-at-eol))) |
| 384 | (unless (= (point) xref-end) | 385 | (goto-char (point-min)) |
| 386 | (when (re-search-forward "Xref: *[^\n:0-9 ]+ *" nil t) | ||
| 387 | (replace-match "" t t)) | ||
| 388 | (goto-char (point-min)) | ||
| 389 | (when (re-search-forward | ||
| 390 | (concat (gnus-group-real-name group) ":[0-9]+") | ||
| 391 | nil t) | ||
| 392 | (replace-match "" t t)) | ||
| 393 | (unless (= (point) (point-max)) | ||
| 385 | (insert " ") | 394 | (insert " ") |
| 386 | (when (not (string= "" prefix)) | 395 | (when (not (string= "" prefix)) |
| 387 | (while (re-search-forward "[^ ]+:[0-9]+" xref-end t) | 396 | (while (re-search-forward "[^ ]+:[0-9]+" nil t) |
| 388 | (save-excursion | 397 | (save-excursion |
| 389 | (goto-char (match-beginning 0)) | 398 | (goto-char (match-beginning 0)) |
| 390 | (insert prefix)) | 399 | (insert prefix)))))) |
| 391 | (setq xref-end (+ xref-end len))) | ||
| 392 | ))) | ||
| 393 | 400 | ||
| 394 | ;; Ensure a trailing \t. | 401 | ;; Ensure a trailing \t. |
| 395 | (end-of-line) | 402 | (end-of-line) |
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el index 1fde4c85b6f..6c09a76ba46 100644 --- a/lisp/gnus/nnweb.el +++ b/lisp/gnus/nnweb.el | |||
| @@ -288,9 +288,9 @@ | |||
| 288 | (save-excursion | 288 | (save-excursion |
| 289 | (set-buffer nnweb-buffer) | 289 | (set-buffer nnweb-buffer) |
| 290 | (erase-buffer) | 290 | (erase-buffer) |
| 291 | (prog1 | 291 | (url-insert-file-contents url) |
| 292 | (url-insert-file-contents url) | 292 | (copy-to-buffer buf (point-min) (point-max)) |
| 293 | (copy-to-buffer buf (point-min) (point-max))))) | 293 | t)) |
| 294 | (nnweb-url-retrieve-asynch | 294 | (nnweb-url-retrieve-asynch |
| 295 | url 'nnweb-callback (current-buffer) nnheader-callback-function) | 295 | url 'nnweb-callback (current-buffer) nnheader-callback-function) |
| 296 | t))) | 296 | t))) |
| @@ -344,7 +344,7 @@ | |||
| 344 | (goto-char (point-min)) | 344 | (goto-char (point-min)) |
| 345 | (while (re-search-forward "&\\([a-z]+\\);" nil t) | 345 | (while (re-search-forward "&\\([a-z]+\\);" nil t) |
| 346 | (replace-match (char-to-string (or (cdr (assq (intern (match-string 1)) | 346 | (replace-match (char-to-string (or (cdr (assq (intern (match-string 1)) |
| 347 | w3-html-entities )) | 347 | w3-html-entities)) |
| 348 | ?#)) | 348 | ?#)) |
| 349 | t t))) | 349 | t t))) |
| 350 | 350 | ||
| @@ -443,7 +443,10 @@ | |||
| 443 | (replace-match "\\1 " t) | 443 | (replace-match "\\1 " t) |
| 444 | (forward-line 1)) | 444 | (forward-line 1)) |
| 445 | (when (re-search-forward "\n\n+" nil t) | 445 | (when (re-search-forward "\n\n+" nil t) |
| 446 | (replace-match "\n" t t)))) | 446 | (replace-match "\n" t t)) |
| 447 | (goto-char (point-min)) | ||
| 448 | (when (search-forward "[More Headers]" nil t) | ||
| 449 | (replace-match "" t t)))) | ||
| 447 | 450 | ||
| 448 | (defun nnweb-dejanews-search (search) | 451 | (defun nnweb-dejanews-search (search) |
| 449 | (nnweb-fetch-form | 452 | (nnweb-fetch-form |
| @@ -564,35 +567,34 @@ | |||
| 564 | (set-marker body nil)))) | 567 | (set-marker body nil)))) |
| 565 | 568 | ||
| 566 | (defun nnweb-reference-search (search) | 569 | (defun nnweb-reference-search (search) |
| 567 | (prog1 | 570 | (url-insert-file-contents |
| 568 | (url-insert-file-contents | 571 | (concat |
| 569 | (concat | 572 | (nnweb-definition 'address) |
| 570 | (nnweb-definition 'address) | 573 | "?" |
| 571 | "?" | 574 | (nnweb-encode-www-form-urlencoded |
| 572 | (nnweb-encode-www-form-urlencoded | 575 | `(("search" . "advanced") |
| 573 | `(("search" . "advanced") | 576 | ("querytext" . ,search) |
| 574 | ("querytext" . ,search) | 577 | ("subj" . "") |
| 575 | ("subj" . "") | 578 | ("name" . "") |
| 576 | ("name" . "") | 579 | ("login" . "") |
| 577 | ("login" . "") | 580 | ("host" . "") |
| 578 | ("host" . "") | 581 | ("organization" . "") |
| 579 | ("organization" . "") | 582 | ("groups" . "") |
| 580 | ("groups" . "") | 583 | ("keywords" . "") |
| 581 | ("keywords" . "") | 584 | ("choice" . "Search") |
| 582 | ("choice" . "Search") | 585 | ("startmonth" . "Jul") |
| 583 | ("startmonth" . "Jul") | 586 | ("startday" . "25") |
| 584 | ("startday" . "25") | 587 | ("startyear" . "1996") |
| 585 | ("startyear" . "1996") | 588 | ("endmonth" . "Aug") |
| 586 | ("endmonth" . "Aug") | 589 | ("endday" . "24") |
| 587 | ("endday" . "24") | 590 | ("endyear" . "1996") |
| 588 | ("endyear" . "1996") | 591 | ("mode" . "Quick") |
| 589 | ("mode" . "Quick") | 592 | ("verbosity" . "Verbose") |
| 590 | ("verbosity" . "Verbose") | 593 | ("ranking" . "Relevance") |
| 591 | ("ranking" . "Relevance") | 594 | ("first" . "1") |
| 592 | ("first" . "1") | 595 | ("last" . "25") |
| 593 | ("last" . "25") | 596 | ("score" . "50"))))) |
| 594 | ("score" . "50"))))) | 597 | (setq buffer-file-name nil) |
| 595 | (setq buffer-file-name nil)) | ||
| 596 | t) | 598 | t) |
| 597 | 599 | ||
| 598 | ;;; | 600 | ;;; |
| @@ -670,21 +672,21 @@ | |||
| 670 | (nnweb-remove-markup))) | 672 | (nnweb-remove-markup))) |
| 671 | 673 | ||
| 672 | (defun nnweb-altavista-search (search &optional part) | 674 | (defun nnweb-altavista-search (search &optional part) |
| 673 | (prog1 | 675 | (url-insert-file-contents |
| 674 | (url-insert-file-contents | 676 | (concat |
| 675 | (concat | 677 | (nnweb-definition 'address) |
| 676 | (nnweb-definition 'address) | 678 | "?" |
| 677 | "?" | 679 | (nnweb-encode-www-form-urlencoded |
| 678 | (nnweb-encode-www-form-urlencoded | 680 | `(("pg" . "aq") |
| 679 | `(("pg" . "aq") | 681 | ("what" . "news") |
| 680 | ("what" . "news") | 682 | ,@(when part `(("stq" . ,(int-to-string (* part 30))))) |
| 681 | ,@(when part `(("stq" . ,(int-to-string (* part 30))))) | 683 | ("fmt" . "d") |
| 682 | ("fmt" . "d") | 684 | ("q" . ,search) |
| 683 | ("q" . ,search) | 685 | ("r" . "") |
| 684 | ("r" . "") | 686 | ("d0" . "") |
| 685 | ("d0" . "") | 687 | ("d1" . ""))))) |
| 686 | ("d1" . ""))))) | 688 | (setq buffer-file-name nil) |
| 687 | (setq buffer-file-name nil))) | 689 | t) |
| 688 | 690 | ||
| 689 | (provide 'nnweb) | 691 | (provide 'nnweb) |
| 690 | 692 | ||
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index 7e6338b8ca3..4b10f782e3f 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | ;;; pop3.el --- Post Office Protocol (RFC 1460) interface | 1 | ;;; pop3.el --- Post Office Protocol (RFC 1460) interface |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996, Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996,1997 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Richard L. Pieri <ratinox@peorth.gweep.net> | 5 | ;; Author: Richard L. Pieri <ratinox@peorth.gweep.net> |
| 6 | ;; Keywords: mail, pop3 | 6 | ;; Keywords: mail, pop3 |
| 7 | ;; Version: 1.3e | 7 | ;; Version: 1.3g |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
| @@ -37,7 +37,7 @@ | |||
| 37 | (require 'mail-utils) | 37 | (require 'mail-utils) |
| 38 | (provide 'pop3) | 38 | (provide 'pop3) |
| 39 | 39 | ||
| 40 | (defconst pop3-version "1.3c") | 40 | (defconst pop3-version "1.3g") |
| 41 | 41 | ||
| 42 | (defvar pop3-maildrop (or user-login-name (getenv "LOGNAME") (getenv "USER") nil) | 42 | (defvar pop3-maildrop (or user-login-name (getenv "LOGNAME") (getenv "USER") nil) |
| 43 | "*POP3 maildrop.") | 43 | "*POP3 maildrop.") |
| @@ -152,7 +152,7 @@ Return the response string if optional second argument is non-nil." | |||
| 152 | (set-buffer (process-buffer process)) | 152 | (set-buffer (process-buffer process)) |
| 153 | (goto-char pop3-read-point) | 153 | (goto-char pop3-read-point) |
| 154 | (while (not (search-forward "\r\n" nil t)) | 154 | (while (not (search-forward "\r\n" nil t)) |
| 155 | (accept-process-output process) | 155 | (accept-process-output process 3) |
| 156 | (goto-char pop3-read-point)) | 156 | (goto-char pop3-read-point)) |
| 157 | (setq match-end (point)) | 157 | (setq match-end (point)) |
| 158 | (goto-char pop3-read-point) | 158 | (goto-char pop3-read-point) |
| @@ -205,6 +205,7 @@ Return the response string if optional second argument is non-nil." | |||
| 205 | 205 | ||
| 206 | (defun pop3-munge-message-separator (start end) | 206 | (defun pop3-munge-message-separator (start end) |
| 207 | "Check to see if a message separator exists. If not, generate one." | 207 | "Check to see if a message separator exists. If not, generate one." |
| 208 | (if (not (fboundp 'message-make-date)) (autoload 'message-make-date "message")) | ||
| 208 | (save-excursion | 209 | (save-excursion |
| 209 | (save-restriction | 210 | (save-restriction |
| 210 | (narrow-to-region start end) | 211 | (narrow-to-region start end) |
| @@ -214,7 +215,8 @@ Return the response string if optional second argument is non-nil." | |||
| 214 | (looking-at "BABYL OPTIONS:") ; Babyl | 215 | (looking-at "BABYL OPTIONS:") ; Babyl |
| 215 | )) | 216 | )) |
| 216 | (let ((from (mail-strip-quoted-names (mail-fetch-field "From"))) | 217 | (let ((from (mail-strip-quoted-names (mail-fetch-field "From"))) |
| 217 | (date (pop3-string-to-list (mail-fetch-field "Date"))) | 218 | (date (pop3-string-to-list (or (mail-fetch-field "Date") |
| 219 | (message-make-date)))) | ||
| 218 | (From_)) | 220 | (From_)) |
| 219 | ;; sample date formats I have seen | 221 | ;; sample date formats I have seen |
| 220 | ;; Date: Tue, 9 Jul 1996 09:04:21 -0400 (EDT) | 222 | ;; Date: Tue, 9 Jul 1996 09:04:21 -0400 (EDT) |
| @@ -315,7 +317,7 @@ This function currently does nothing.") | |||
| 315 | (save-excursion | 317 | (save-excursion |
| 316 | (set-buffer (process-buffer process)) | 318 | (set-buffer (process-buffer process)) |
| 317 | (while (not (re-search-forward "^\\.\r\n" nil t)) | 319 | (while (not (re-search-forward "^\\.\r\n" nil t)) |
| 318 | (accept-process-output process) | 320 | (accept-process-output process 3) |
| 319 | ;; bill@att.com ... to save wear and tear on the heap | 321 | ;; bill@att.com ... to save wear and tear on the heap |
| 320 | (if (> (buffer-size) 20000) (sleep-for 1)) | 322 | (if (> (buffer-size) 20000) (sleep-for 1)) |
| 321 | (if (> (buffer-size) 50000) (sleep-for 1)) | 323 | (if (> (buffer-size) 50000) (sleep-for 1)) |