/[emacs]/emacs/lisp/gnus/message.el
ViewVC logotype

Diff of /emacs/lisp/gnus/message.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.88 by rfrancoise, Sat Sep 24 13:46:19 2005 UTC revision 1.89 by miles, Wed Sep 28 05:26:01 2005 UTC
# Line 2030  With prefix-argument just set Follow-Up, Line 2030  With prefix-argument just set Follow-Up,
2030    
2031  ;;; End of functions adopted from `message-utils.el'.  ;;; End of functions adopted from `message-utils.el'.
2032    
2033    (defun message-remove-duplicates (list)
2034      (let (new)
2035        (while list
2036          (or (member (car list) new)
2037              (setq new (cons (car list) new)))
2038          (setq list (cdr list)))
2039        (nreverse new)))
2040    
2041  (defun message-remove-header (header &optional is-regexp first reverse)  (defun message-remove-header (header &optional is-regexp first reverse)
2042    "Remove HEADER in the narrowed buffer.    "Remove HEADER in the narrowed buffer.
2043  If IS-REGEXP, HEADER is a regular expression.  If IS-REGEXP, HEADER is a regular expression.
# Line 4957  subscribed address (and not the addition Line 4965  subscribed address (and not the addition
4965    (let ((field (message-fetch-field header))    (let ((field (message-fetch-field header))
4966          rhs ace  address)          rhs ace  address)
4967      (when field      (when field
4968        (dolist (address (mail-header-parse-addresses field))        (dolist (rhs
4969          (setq address (car address)                 (message-remove-duplicates
4970                rhs (downcase (or (cadr (split-string address "@")) ""))                  (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) ""))
4971                ace (downcase (idna-to-ascii rhs)))                          (mapcar 'downcase
4972                                    (mapcar
4973                                     'car (mail-header-parse-addresses field))))))
4974            (setq ace (downcase (idna-to-ascii rhs)))
4975          (when (and (not (equal rhs ace))          (when (and (not (equal rhs ace))
4976                     (or (not (eq message-use-idna 'ask))                     (or (not (eq message-use-idna 'ask))
4977                         (y-or-n-p (format "Replace %s with %s? " rhs ace))))                         (y-or-n-p (format "Replace %s with %s in %s:? "
4978                                             rhs ace header))))
4979            (goto-char (point-min))            (goto-char (point-min))
4980            (while (re-search-forward (concat "^" header ":") nil t)            (while (re-search-forward (concat "^" header ":") nil t)
4981              (message-narrow-to-field)              (message-narrow-to-field)
# Line 4982  See `message-idna-encode'." Line 4994  See `message-idna-encode'."
4994          (message-narrow-to-head)          (message-narrow-to-head)
4995          (message-idna-to-ascii-rhs-1 "From")          (message-idna-to-ascii-rhs-1 "From")
4996          (message-idna-to-ascii-rhs-1 "To")          (message-idna-to-ascii-rhs-1 "To")
4997            (message-idna-to-ascii-rhs-1 "Reply-To")
4998            (message-idna-to-ascii-rhs-1 "Mail-Reply-To")
4999            (message-idna-to-ascii-rhs-1 "Mail-Followup-To")
5000          (message-idna-to-ascii-rhs-1 "Cc")))))          (message-idna-to-ascii-rhs-1 "Cc")))))
5001    
5002  (defun message-generate-headers (headers)  (defun message-generate-headers (headers)

Legend:
Removed from v.1.88  
changed lines
  Added in v.1.89

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26