From: Miles Bader Date: Thu, 6 Dec 2007 00:46:32 +0000 (+0000) Subject: Merge from gnus--devo--0 X-Git-Tag: emacs-pretest-23.0.90~9063 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=415a09fbafcaa6bb73027ff7e7c830ae7117c768;p=emacs.git Merge from gnus--devo--0 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-944 --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 87e7f595cab..bb92d478277 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -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 --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 059d43bf0b8..4bb9ceb97ba 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2802,8 +2802,37 @@ Recurse into multiparts." (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)