[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el |
Date: |
Wed, 28 Sep 2005 01:26:05 -0400 |
Index: emacs/lisp/gnus/gnus-art.el
diff -c emacs/lisp/gnus/gnus-art.el:1.96 emacs/lisp/gnus/gnus-art.el:1.97
*** emacs/lisp/gnus/gnus-art.el:1.96 Sat Sep 24 13:46:19 2005
--- emacs/lisp/gnus/gnus-art.el Wed Sep 28 05:26:01 2005
***************
*** 2333,2352 ****
(autoload 'idna-to-unicode "idna")
(defun article-decode-idna-rhs ()
! "Decode IDNA strings in RHS in From:, To: and Cc: headers in current
buffer."
(when gnus-use-idna
(save-restriction
(let ((inhibit-point-motion-hooks t)
(inhibit-read-only t))
(article-narrow-to-head)
(goto-char (point-min))
! (while (re-search-forward "@.*\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil
t)
(let (ace unicode)
(when (save-match-data
(and (setq ace (match-string 1))
(save-excursion
(and (re-search-backward "^[^ \t]" nil t)
! (looking-at "From\\|To\\|Cc")))
(setq unicode (idna-to-unicode ace))))
(unless (string= ace unicode)
(replace-match unicode nil nil nil 1)))))))))
--- 2333,2354 ----
(autoload 'idna-to-unicode "idna")
(defun article-decode-idna-rhs ()
! "Decode IDNA strings in RHS in various headers in current buffer.
! The following headers are decoded: From:, To:, Cc:, Reply-To:,
! Mail-Reply-To: and Mail-Followup-To:."
(when gnus-use-idna
(save-restriction
(let ((inhibit-point-motion-hooks t)
(inhibit-read-only t))
(article-narrow-to-head)
(goto-char (point-min))
! (while (re-search-forward "@[^ \t\n\r,>]*\\(xn--[-A-Za-z0-9.]*\\)[
\t\n\r,>]" nil t)
(let (ace unicode)
(when (save-match-data
(and (setq ace (match-string 1))
(save-excursion
(and (re-search-backward "^[^ \t]" nil t)
! (looking-at
"From\\|To\\|Cc\\|Reply-To\\|Mail-Reply-To\\|Mail-Followup-To")))
(setq unicode (idna-to-unicode ace))))
(unless (string= ace unicode)
(replace-match unicode nil nil nil 1)))))))))
***************
*** 4864,4877 ****
(forward-line -1)
(setq beg (point)))
(gnus-article-insert-newline)
! (mm-insert-inline handle
! (let ((charset
! (mail-content-type-get
! (mm-handle-type handle) 'charset)))
! (if (eq charset 'gnus-decoded)
! (mm-get-part handle)
! (mm-decode-string (mm-get-part handle)
! charset))))
(goto-char (point-max))))
;; Do highlighting.
(save-excursion
--- 4866,4882 ----
(forward-line -1)
(setq beg (point)))
(gnus-article-insert-newline)
! (mm-insert-inline
! handle
! (let ((charset (mail-content-type-get (mm-handle-type handle)
! 'charset)))
! (cond ((not charset)
! (mm-string-as-multibyte (mm-get-part handle)))
! ((eq charset 'gnus-decoded)
! (with-current-buffer (mm-handle-buffer handle)
! (buffer-string)))
! (t
! (mm-decode-string (mm-get-part handle) charset)))))
(goto-char (point-max))))
;; Do highlighting.
(save-excursion