mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-03 11:33:37 +00:00
* gnus-art.el (gnus-mime-set-charset-parameters): Add new argument
`charset'; fix name of function called recursively. (gnus-mime-view-part-as-charset): Don't bind gnus-newsgroup-charset.
This commit is contained in:
parent
f1ba6ccdf5
commit
c0ccb0d665
@ -1,3 +1,9 @@
|
||||
2008-09-09 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-art.el (gnus-mime-set-charset-parameters): Add new argument
|
||||
`charset'; fix name of function called recursively.
|
||||
(gnus-mime-view-part-as-charset): Don't bind gnus-newsgroup-charset.
|
||||
|
||||
2008-09-09 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-art.el (gnus-mime-strip-charset-parameters): Remove.
|
||||
|
@ -5138,11 +5138,14 @@ Compressed files like .gz and .bz2 are decompressed."
|
||||
(mm-string-to-multibyte contents)))
|
||||
(goto-char b)))))
|
||||
|
||||
(defun gnus-mime-set-charset-parameters (handle)
|
||||
"Set charset to parameters in HANDLE.
|
||||
The value of `gnus-newsgroup-charset' is used as a charset."
|
||||
(defun gnus-mime-set-charset-parameters (handle charset)
|
||||
"Set CHARSET to parameters in HANDLE.
|
||||
CHARSET may either be a string or a symbol."
|
||||
(unless (stringp charset)
|
||||
(setq charset (symbol-name charset)))
|
||||
(if (stringp (car handle))
|
||||
(mapc #'gnus-mime-strip-charset-parameters (cdr handle))
|
||||
(dolist (h (cdr handle))
|
||||
(gnus-mime-set-charset-parameters h charset))
|
||||
(let* ((type (mm-handle-type (if (equal (mm-handle-media-type handle)
|
||||
"message/external-body")
|
||||
(progn
|
||||
@ -5150,11 +5153,10 @@ The value of `gnus-newsgroup-charset' is used as a charset."
|
||||
(mm-extern-cache-contents handle))
|
||||
(mm-handle-cache handle))
|
||||
handle)))
|
||||
(charset (assq 'charset (cdr type))))
|
||||
(if charset
|
||||
(setcdr charset (symbol-name gnus-newsgroup-charset))
|
||||
(setcdr type (cons (cons 'charset (symbol-name gnus-newsgroup-charset))
|
||||
(cdr type)))))))
|
||||
(param (assq 'charset (cdr type))))
|
||||
(if param
|
||||
(setcdr param charset)
|
||||
(setcdr type (cons (cons 'charset charset) (cdr type)))))))
|
||||
|
||||
(defun gnus-mime-view-part-as-charset (&optional handle arg)
|
||||
"Insert the MIME part under point into the current buffer using the
|
||||
@ -5164,18 +5166,18 @@ specified charset."
|
||||
(let ((handle (or handle (get-text-property (point) 'gnus-data)))
|
||||
(fun (get-text-property (point) 'gnus-callback))
|
||||
(gnus-newsgroup-ignored-charsets 'gnus-all)
|
||||
gnus-newsgroup-charset form preferred parts)
|
||||
charset form preferred parts)
|
||||
(when handle
|
||||
(when (prog1
|
||||
(and fun
|
||||
(setq gnus-newsgroup-charset
|
||||
(setq charset
|
||||
(or (cdr (assq
|
||||
arg
|
||||
gnus-summary-show-article-charset-alist))
|
||||
(mm-read-coding-system "Charset: "))))
|
||||
(if (mm-handle-undisplayer handle)
|
||||
(mm-remove-part handle)))
|
||||
(gnus-mime-set-charset-parameters handle)
|
||||
(gnus-mime-set-charset-parameters handle charset)
|
||||
(when (and (consp (setq form (cdr-safe fun)))
|
||||
(setq form (ignore-errors
|
||||
(assq 'gnus-mime-display-alternative form)))
|
||||
|
Loading…
Reference in New Issue
Block a user