# HG changeset patch # User Miles Bader # Date 1196901992 0 # Node ID 90b29ef76212e5d2a82cbf97af9b6edf43c3c043 # Parent ec0ef12211d900ef8fa37a1b6ddf95791588cc87 Merge from gnus--devo--0 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-944 diff -r ec0ef12211d9 -r 90b29ef76212 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Thu Dec 06 00:46:18 2007 +0000 +++ b/lisp/gnus/ChangeLog Thu Dec 06 00:46:32 2007 +0000 @@ -1,3 +1,34 @@ +2007-12-05 Katsumi Yamaoka + + * gnus-art.el (gnus-use-idna) + * gnus-start.el (gnus-site-init-file) + * message.el (message-use-idna) + * mm-uu.el (mm-uu-hide-markers) + * smiley.el (smiley-style): Revert changes that suppress warnings. + +2007-12-05 Katsumi Yamaoka + + * gnus-art.el (gnus-article-browse-html-parts): Add meta html tag to + specify charset to html source. Reported by Christoph Conrad + . + +2007-12-05 Katsumi Yamaoka + + * gnus-art.el (gnus-use-idna): Don't directly refer to the value of + idna-program in order to suppress byte compile warning issued by XEmacs + that came to byte compile the default value section of defcustom forms + recently. + + * gnus-start.el (gnus-site-init-file): Don't directly refer to the + value of installation-directory. + + * message.el (message-use-idna): Don't directly refer to the value of + idna-program. + + * mm-uu.el (mm-uu-hide-markers): Don't directly call defined-colors. + + * smiley.el (smiley-style): Don't directly call face-attribute. + 2007-12-04 Reiner Steib * gnus-group.el (gnus-group-highlight-line): Add FIXME. diff -r ec0ef12211d9 -r 90b29ef76212 lisp/gnus/gnus-art.el --- a/lisp/gnus/gnus-art.el Thu Dec 06 00:46:18 2007 +0000 +++ b/lisp/gnus/gnus-art.el Thu Dec 06 00:46:32 2007 +0000 @@ -2802,8 +2802,37 @@ (string-match "text/html" (car (mm-handle-type handle)))) (let ((tmp-file (mm-make-temp-file ;; Do we need to care for 8.3 filenames? - "mm-" nil ".html"))) - (mm-save-part-to-file handle tmp-file) + "mm-" nil ".html")) + (charset (mail-content-type-get (mm-handle-type handle) + 'charset))) + (if charset + ;; Add a meta html tag to specify charset. + (mm-with-unibyte-buffer + (insert (with-current-buffer (mm-handle-buffer handle) + (if (eq charset 'gnus-decoded) + (mm-encode-coding-string + (buffer-string) + (setq charset 'utf-8)) + (buffer-string)))) + (setq charset (format "\ +" + charset)) + (goto-char (point-min)) + (let ((case-fold-search t)) + (cond (;; Don't modify existing meta tag. + (re-search-forward "\ +]+>" + nil t)) + ((re-search-forward "[\t\n\r ]*" nil t) + (insert charset "\n")) + (t + (re-search-forward "\ +]+\\|[\t\n\r ]*\\)>[\t\n\r ]*" + nil t) + (insert "\n" charset "\n\n")))) + (mm-write-region (point-min) (point-max) + tmp-file nil nil nil 'binary t)) + (mm-save-part-to-file handle tmp-file)) (add-to-list 'gnus-article-browse-html-temp-list tmp-file) (add-hook 'gnus-summary-prepare-exit-hook 'gnus-article-browse-delete-temp-files)