1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00

Merge from gnus--devo--0

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-944
This commit is contained in:
Miles Bader 2007-12-06 00:46:32 +00:00
parent e5e76c0431
commit 415a09fbaf
2 changed files with 62 additions and 2 deletions

View File

@ -1,3 +1,34 @@
2007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
* 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 <yamaoka@jpl.org>
* gnus-art.el (gnus-article-browse-html-parts): Add meta html tag to
specify charset to html source. Reported by Christoph Conrad
<christoph.conrad@gmx.de>.
2007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
* 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 <Reiner.Steib@gmx.de>
* gnus-group.el (gnus-group-highlight-line): Add FIXME.

View File

@ -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 "\
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">"
charset))
(goto-char (point-min))
(let ((case-fold-search t))
(cond (;; Don't modify existing meta tag.
(re-search-forward "\
<meta[\t\n\r ]+http-equiv=\"content-type\"[^>]+>"
nil t))
((re-search-forward "<head>[\t\n\r ]*" nil t)
(insert charset "\n"))
(t
(re-search-forward "\
<html\\(?:[\t\n\r ]+[^>]+\\|[\t\n\r ]*\\)>[\t\n\r ]*"
nil t)
(insert "<head>\n" charset "\n</head>\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)