emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el
Date: Wed, 12 Apr 2006 05:23:28 +0000

Index: emacs/lisp/gnus/gnus-art.el
diff -u emacs/lisp/gnus/gnus-art.el:1.109 emacs/lisp/gnus/gnus-art.el:1.110
--- emacs/lisp/gnus/gnus-art.el:1.109   Tue Apr 11 23:22:06 2006
+++ emacs/lisp/gnus/gnus-art.el Wed Apr 12 05:23:27 2006
@@ -4477,19 +4477,29 @@
 specified charset."
   (interactive (list nil current-prefix-arg))
   (gnus-article-check-buffer)
-  (let* ((handle (or handle (get-text-property (point) 'gnus-data)))
-        contents charset
-        (b (point))
-        (inhibit-read-only t))
+  (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 type charset)
     (when handle
       (if (mm-handle-undisplayer handle)
          (mm-remove-part handle))
-      (let ((gnus-newsgroup-charset
-            (or (cdr (assq arg
-                           gnus-summary-show-article-charset-alist))
-                (mm-read-coding-system "Charset: ")))
-         (gnus-newsgroup-ignored-charsets 'gnus-all))
-       (gnus-article-press-button)))))
+      (when fun
+       (setq gnus-newsgroup-charset
+             (or (cdr (assq arg gnus-summary-show-article-charset-alist))
+                 (mm-read-coding-system "Charset: ")))
+       ;; Strip the charset parameter from `handle'.
+       (setq type (mm-handle-type
+                   (if (equal (mm-handle-media-type handle)
+                              "message/external-body")
+                       (progn
+                         (unless (mm-handle-cache handle)
+                           (mm-extern-cache-contents handle))
+                         (mm-handle-cache handle))
+                     handle))
+             charset (assq 'charset (cdr type)))
+       (delq charset type)
+       (funcall fun handle)))))
 
 (defun gnus-mime-view-part-externally (&optional handle)
   "View the MIME part under point with an external viewer."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]