Mercurial > emacs
comparison lisp/gnus/gnus-art.el @ 19969:5f1ab3dd344d
*** empty log message ***
author | Lars Magne Ingebrigtsen <larsi@gnus.org> |
---|---|
date | Wed, 24 Sep 1997 01:50:24 +0000 |
parents | 2a7342ecf59d |
children | 2c30b1fb6409 |
comparison
equal
deleted
inserted
replaced
19968:88dd57f50303 | 19969:5f1ab3dd344d |
---|---|
189 2 3 gnus-emphasis-underline) | 189 2 3 gnus-emphasis-underline) |
190 ,@(mapcar | 190 ,@(mapcar |
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: |
198 | 198 |
199 (\"_\\\\(\\\\w+\\\\)_\" 0 1 'underline) | 199 (\"_\\\\(\\\\w+\\\\)_\" 0 1 'underline) |
395 "*A hook called after an article has been prepared in the article buffer. | 395 "*A hook called after an article has been prepared in the article buffer. |
396 If you want to run a special decoding program like nkf, use this hook." | 396 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 |
403 An article button is a piece of text that you can activate by pressing | 408 An article button is a piece of text that you can activate by pressing |
404 `RET' or `mouse-2' above it." | 409 `RET' or `mouse-2' above it." |
411 Article buttons will be displayed in this face when the cursor is | 416 Article buttons will be displayed in this face when the cursor is |
412 above them." | 417 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 |
422 "Face used for highlighting a signature in the article buffer. | |
423 Obsolete; use the face `gnus-signature-face' for customizations instead." | |
424 :type 'face | |
425 :group 'gnus-article-highlight | |
426 :group 'gnus-article-signature) | |
427 | |
428 (defface gnus-signature-face | |
429 '((((type x)) | |
430 (:italic t))) | |
417 "Face used for highlighting a signature in the article buffer." | 431 "Face used for highlighting a signature in the article buffer." |
418 :type 'face | |
419 :group 'gnus-article-highlight | 432 :group 'gnus-article-highlight |
420 :group 'gnus-article-signature) | 433 :group 'gnus-article-signature) |
421 | 434 |
422 (defface gnus-header-from-face | 435 (defface gnus-header-from-face |
423 '((((class color) | 436 '((((class color) |
567 (add-text-properties b (incf b) gnus-hidden-properties))))) | 580 (add-text-properties b (incf b) gnus-hidden-properties))))) |
568 | 581 |
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." |
589 (text-property-any (point-min) (point-max) 'article-type type)) | 602 (text-property-any (point-min) (point-max) 'article-type type)) |
590 | 603 |
826 from) | 839 from) |
827 (save-restriction | 840 (save-restriction |
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) |
861 (defun article-decode-rfc1522 () | 887 (defun article-decode-rfc1522 () |
862 "Hack to remove QP encoding from headers." | 888 "Hack to remove QP encoding from headers." |
935 (widen) | 961 (widen) |
936 (goto-char (point-min)) | 962 (goto-char (point-min)) |
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. |
964 If given a negative prefix, always show; if given a positive prefix, | 991 If given a negative prefix, always show; if given a positive prefix, |
965 always hide." | 992 always hide." |
1099 t | 1126 t |
1100 (goto-char cur) | 1127 (goto-char cur) |
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." |
1108 (interactive) | 1136 (interactive) |
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) |
1115 (setq b (point)) | 1144 (setq b (point)) |
1116 (point-max)) | 1145 (point-max)) |
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)) |
1129 (set-buffer cbuf)))) | 1159 (set-buffer cbuf)))) |
1130 | 1160 |
1389 (or gnus-saved-headers gnus-visible-headers)) | 1419 (or gnus-saved-headers gnus-visible-headers)) |
1390 (gnus-article-buffer save-buffer)) | 1420 (gnus-article-buffer save-buffer)) |
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. |
1398 (set-buffer gnus-article-buffer) | 1428 (set-buffer gnus-article-buffer) |
1399 (let* ((gnus-save-article-buffer save-buffer) | 1429 (let* ((gnus-save-article-buffer save-buffer) |
1450 (file-name-nondirectory default-name) ") ") | 1480 (file-name-nondirectory default-name) ") ") |
1451 (file-name-directory default-name) | 1481 (file-name-directory default-name) |
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) |
1459 (t gnus-article-save-directory)))) | 1490 (t gnus-article-save-directory)))) |
1460 (read-file-name | 1491 (read-file-name |
1716 ;;; Gnus article mode | 1747 ;;; Gnus article mode |
1717 ;;; | 1748 ;;; |
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) |
1752 (unless (boundp 'gnus-article-article-menu) | 1782 (unless (boundp 'gnus-article-article-menu) |
1753 (easy-menu-define | 1783 (easy-menu-define |
2030 (insert-buffer-substring artbuf) | 2060 (insert-buffer-substring artbuf) |
2031 ;; Append newline at end of the buffer as separator, and then | 2061 ;; Append newline at end of the buffer as separator, and then |
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. |
2039 If given a numerical ARG, move forward ARG pages." | 2070 If given a numerical ARG, move forward ARG pages." |
2040 (interactive "P") | 2071 (interactive "P") |
2149 (defun gnus-article-show-summary () | 2180 (defun gnus-article-show-summary () |
2150 "Reconfigure windows to show summary buffer." | 2181 "Reconfigure windows to show summary buffer." |
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 |
2157 (defun gnus-article-describe-briefly () | 2189 (defun gnus-article-describe-briefly () |
2158 "Describe article mode commands briefly." | 2190 "Describe article mode commands briefly." |
2440 If FORCE is non-nil, allow editing of articles even in read-only | 2472 If FORCE is non-nil, allow editing of articles even in read-only |
2441 groups." | 2473 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 |
2449 ,(or (mail-header-references gnus-current-headers) "") | 2481 ,(or (mail-header-references gnus-current-headers) "") |
2450 ,(gnus-group-read-only-p) ,gnus-summary-buffer)))) | 2482 ,(gnus-group-read-only-p) ,gnus-summary-buffer)))) |
2452 (defun gnus-article-edit-article (exit-func) | 2484 (defun gnus-article-edit-article (exit-func) |
2453 "Start editing the contents of the current article buffer." | 2485 "Start editing the contents of the current article buffer." |
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) |
2461 (gnus-message 6 "C-c C-c to end edits"))) | 2493 (gnus-message 6 "C-c C-c to end edits"))) |
2462 | 2494 |
2530 :type 'regexp) | 2562 :type 'regexp) |
2531 | 2563 |
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. |
2546 (,gnus-button-url-regexp 0 t gnus-button-url 0)) | 2578 (,gnus-button-url-regexp 0 t gnus-button-url 0)) |
2547 "Alist of regexps matching buttons in article bodies. | 2579 "Alist of regexps matching buttons in article bodies. |
2570 0 t gnus-button-message-id 0) | 2602 0 t gnus-button-message-id 0) |
2571 ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" 1 t gnus-button-reply 1) | 2603 ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" 1 t gnus-button-reply 1) |
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)) |
2578 "Alist of headers and regexps to match buttons in article heads. | 2611 "Alist of headers and regexps to match buttons in article heads. |
2579 | 2612 |
2844 (list 'gnus-callback fun) | 2877 (list 'gnus-callback fun) |
2845 (and data (list 'gnus-data data))))) | 2878 (and data (list 'gnus-data data))))) |
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) |
2852 (let ((buffer-read-only nil) | 2890 (let ((buffer-read-only nil) |
2853 (inhibit-point-motion-hooks t)) | 2891 (inhibit-point-motion-hooks t)) |