comparison lisp/gnus/gnus-sum.el @ 90599:c358d0861b16

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 414-422) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 128-130) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-108
author Miles Bader <miles@gnu.org>
date Tue, 05 Sep 2006 02:54:22 +0000
parents 858cb33ae39d de654a6735da
children 8dd8c8286063
comparison
equal deleted inserted replaced
90598:4a8681a3d827 90599:c358d0861b16
990 :type '(choice (const :tag "None" nil) 990 :type '(choice (const :tag "None" nil)
991 function) 991 function)
992 :group 'gnus-summary) 992 :group 'gnus-summary)
993 993
994 (defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string 994 (defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string
995 "Variable that says which function should be used to decode a string with encoded words.") 995 "Function used to decode a string with encoded words.")
996
997 (defvar gnus-decode-encoded-address-function
998 'mail-decode-encoded-address-string
999 "Function used to decode addresses with encoded words.")
996 1000
997 (defcustom gnus-extra-headers '(To Newsgroups) 1001 (defcustom gnus-extra-headers '(To Newsgroups)
998 "*Extra headers to parse." 1002 "*Extra headers to parse."
999 :version "21.1" 1003 :version "21.1"
1000 :group 'gnus-summary 1004 :group 'gnus-summary
1001 :type '(repeat symbol)) 1005 :type '(repeat symbol))
1002 1006
1003 (defcustom gnus-ignored-from-addresses 1007 (defcustom gnus-ignored-from-addresses
1004 (and user-mail-address 1008 (and user-mail-address
1005 (not (string= user-mail-address "")) 1009 (not (string= user-mail-address ""))
1006 (regexp-quote user-mail-address)) 1010 (regexp-quote user-mail-address))
1007 "*Regexp of From headers that may be suppressed in favor of To headers." 1011 "*Regexp of From headers that may be suppressed in favor of To headers."
1008 :version "21.1" 1012 :version "21.1"
1009 :group 'gnus-summary 1013 :group 'gnus-summary
3434 (cond 3438 (cond
3435 ((setq to (cdr (assq 'To extra-headers))) 3439 ((setq to (cdr (assq 'To extra-headers)))
3436 (concat "-> " 3440 (concat "-> "
3437 (inline 3441 (inline
3438 (gnus-summary-extract-address-component 3442 (gnus-summary-extract-address-component
3439 (funcall gnus-decode-encoded-word-function to))))) 3443 (funcall gnus-decode-encoded-address-function to)))))
3440 ((setq newsgroups (cdr (assq 'Newsgroups extra-headers))) 3444 ((setq newsgroups (cdr (assq 'Newsgroups extra-headers)))
3441 (concat "=> " newsgroups))))) 3445 (concat "=> " newsgroups)))))
3442 (inline (gnus-summary-extract-address-component gnus-tmp-from))))) 3446 (inline (gnus-summary-extract-address-component gnus-tmp-from)))))
3443 3447
3444 (defun gnus-summary-insert-line (gnus-tmp-header 3448 (defun gnus-summary-insert-line (gnus-tmp-header
4180 (funcall gnus-decode-encoded-word-function 4184 (funcall gnus-decode-encoded-word-function
4181 (setq x (nnheader-nov-field)))) 4185 (setq x (nnheader-nov-field))))
4182 (error x)) 4186 (error x))
4183 (condition-case () ; from 4187 (condition-case () ; from
4184 (gnus-remove-odd-characters 4188 (gnus-remove-odd-characters
4185 (funcall gnus-decode-encoded-word-function 4189 (funcall gnus-decode-encoded-address-function
4186 (setq x (nnheader-nov-field)))) 4190 (setq x (nnheader-nov-field))))
4187 (error x)) 4191 (error x))
4188 (nnheader-nov-field) ; date 4192 (nnheader-nov-field) ; date
4189 (nnheader-nov-read-message-id) ; id 4193 (nnheader-nov-read-message-id) ; id
4190 (setq references (nnheader-nov-field)) ; refs 4194 (setq references (nnheader-nov-field)) ; refs
5954 "(none)")) 5958 "(none)"))
5955 ;; From. 5959 ;; From.
5956 (progn 5960 (progn
5957 (goto-char p) 5961 (goto-char p)
5958 (if (search-forward "\nfrom:" nil t) 5962 (if (search-forward "\nfrom:" nil t)
5959 (funcall gnus-decode-encoded-word-function 5963 (funcall gnus-decode-encoded-address-function
5960 (nnheader-header-value)) 5964 (nnheader-header-value))
5961 "(nobody)")) 5965 "(nobody)"))
5962 ;; Date. 5966 ;; Date.
5963 (progn 5967 (progn
5964 (goto-char p) 5968 (goto-char p)
8447 (set-buffer gnus-original-article-buffer) 8451 (set-buffer gnus-original-article-buffer)
8448 ;; Have the digest group inherit the main mail address of 8452 ;; Have the digest group inherit the main mail address of
8449 ;; the parent article. 8453 ;; the parent article.
8450 (when (setq to-address (or (gnus-fetch-field "reply-to") 8454 (when (setq to-address (or (gnus-fetch-field "reply-to")
8451 (gnus-fetch-field "from"))) 8455 (gnus-fetch-field "from")))
8452 (setq params (append 8456 (setq params
8453 (list (cons 'to-address 8457 (append
8454 (funcall gnus-decode-encoded-word-function 8458 (list (cons 'to-address
8455 to-address)))))) 8459 (funcall gnus-decode-encoded-address-function
8460 to-address))))))
8456 (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) 8461 (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*"))
8457 (insert-buffer-substring gnus-original-article-buffer) 8462 (insert-buffer-substring gnus-original-article-buffer)
8458 ;; Remove lines that may lead nndoc to misinterpret the 8463 ;; Remove lines that may lead nndoc to misinterpret the
8459 ;; document type. 8464 ;; document type.
8460 (narrow-to-region 8465 (narrow-to-region