summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-art.el
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2000-09-20 16:54:57 +0000
committerDave Love <fx@gnu.org>2000-09-20 16:54:57 +0000
commit8b93df0128d3c27cc67aa77885d925ca991c0215 (patch)
treec075a34664f453e5da61d2aeebe4afc1141fe4ac /lisp/gnus/gnus-art.el
parent805b7fc07472cdd3d863b9ade9235d871c96d545 (diff)
downloademacs-8b93df0128d3c27cc67aa77885d925ca991c0215.tar.gz
Merge from Gnus trunk.
Diffstat (limited to 'lisp/gnus/gnus-art.el')
-rw-r--r--lisp/gnus/gnus-art.el57
1 files changed, 48 insertions, 9 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index c552c966d10..4bc1e3fe708 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -871,8 +871,11 @@ See the manual for details."
:type gnus-article-treat-custom)
(put 'gnus-treat-overstrike 'highlight t)
-(defcustom gnus-treat-display-xface (if (and gnus-xemacs (featurep 'xface))
- 'head nil)
+(defcustom gnus-treat-display-xface
+ (and (or (and (fboundp 'image-type-available-p)
+ (image-type-available-p 'xbm))
+ (and gnus-xemacs (featurep 'xface)))
+ 'head)
"Display X-Face headers.
Valid values are nil, t, `head', `last', an integer or a predicate.
See the manual for details."
@@ -1510,9 +1513,21 @@ If FORCE, decode the article whether it is marked as quoted-printable
or not."
(interactive (list 'force))
(save-excursion
- (let ((buffer-read-only nil)
- (type (gnus-fetch-field "content-transfer-encoding"))
- (charset gnus-newsgroup-charset))
+ (let ((buffer-read-only nil) type charset)
+ (if (gnus-buffer-live-p gnus-original-article-buffer)
+ (with-current-buffer gnus-original-article-buffer
+ (setq type
+ (gnus-fetch-field "content-transfer-encoding"))
+ (let* ((ct (gnus-fetch-field "content-type"))
+ (ctl (and ct
+ (ignore-errors
+ (mail-header-parse-content-type ct)))))
+ (setq charset (and ctl
+ (mail-content-type-get ctl 'charset)))
+ (if (stringp charset)
+ (setq charset (intern (downcase charset)))))))
+ (unless charset
+ (setq charset gnus-newsgroup-charset))
(when (or force
(and type (string-match "quoted-printable" (downcase type))))
(article-goto-body)
@@ -1523,9 +1538,21 @@ or not."
If FORCE, decode the article whether it is marked as base64 not."
(interactive (list 'force))
(save-excursion
- (let ((buffer-read-only nil)
- (type (gnus-fetch-field "content-transfer-encoding"))
- (charset gnus-newsgroup-charset))
+ (let ((buffer-read-only nil) type charset)
+ (if (gnus-buffer-live-p gnus-original-article-buffer)
+ (with-current-buffer gnus-original-article-buffer
+ (setq type
+ (gnus-fetch-field "content-transfer-encoding"))
+ (let* ((ct (gnus-fetch-field "content-type"))
+ (ctl (and ct
+ (ignore-errors
+ (mail-header-parse-content-type ct)))))
+ (setq charset (and ctl
+ (mail-content-type-get ctl 'charset)))
+ (if (stringp charset)
+ (setq charset (intern (downcase charset)))))))
+ (unless charset
+ (setq charset gnus-newsgroup-charset))
(when (or force
(and type (string-match "base64" (downcase type))))
(article-goto-body)
@@ -1551,7 +1578,19 @@ If FORCE, decode the article whether it is marked as base64 not."
(interactive)
(save-excursion
(let ((buffer-read-only nil)
- (charset gnus-newsgroup-charset))
+ charset)
+ (if (gnus-buffer-live-p gnus-original-article-buffer)
+ (with-current-buffer gnus-original-article-buffer
+ (let* ((ct (gnus-fetch-field "content-type"))
+ (ctl (and ct
+ (ignore-errors
+ (mail-header-parse-content-type ct)))))
+ (setq charset (and ctl
+ (mail-content-type-get ctl 'charset)))
+ (if (stringp charset)
+ (setq charset (intern (downcase charset)))))))
+ (unless charset
+ (setq charset gnus-newsgroup-charset))
(article-goto-body)
(save-window-excursion
(save-restriction