changeset 93723:2da1f95ea11c

(mm-inline-media-tests): Add entry for x-diff.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 05 Apr 2008 20:05:50 +0000
parents ac376173ee3d
children ed8dca79d6ab
files lisp/gnus/ChangeLog lisp/gnus/mm-decode.el
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Sat Apr 05 20:02:32 2008 +0000
+++ b/lisp/gnus/ChangeLog	Sat Apr 05 20:05:50 2008 +0000
@@ -1,5 +1,7 @@
 2008-04-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* mm-decode.el (mm-inline-media-tests): Add entry for x-diff.
+
 	* nnweb.el (nnweb-init): Avoid nn-with-unibyte.
 
 2008-04-03  Stefan Monnier  <monnier@iro.umontreal.ca>
--- a/lisp/gnus/mm-decode.el	Sat Apr 05 20:02:32 2008 +0000
+++ b/lisp/gnus/mm-decode.el	Sat Apr 05 20:05:50 2008 +0000
@@ -235,6 +235,9 @@
        ;; makes it possible to install another package which provides an
        ;; alternative implementation of diff-mode.  --Stef
        (fboundp 'diff-mode)))
+    ;; In case mime.types uses x-diff (as does Debian's mime-support-3.40).
+    ("text/x-diff" mm-display-patch-inline
+     (lambda (handle) (fboundp 'diff-mode)))
     ("application/emacs-lisp" mm-display-elisp-inline identity)
     ("application/x-emacs-lisp" mm-display-elisp-inline identity)
     ("text/dns" mm-display-dns-inline identity)
@@ -1233,10 +1236,9 @@
       (setq filename (gnus-map-function mm-file-name-rewrite-functions
 					(file-name-nondirectory filename))))
     (setq file
-	  (mm-with-multibyte
-	   (read-file-name (or prompt "Save MIME part to: ")
-			   (or mm-default-directory default-directory)
-			   nil nil (or filename ""))))
+          (read-file-name (or prompt "Save MIME part to: ")
+                          (or mm-default-directory default-directory)
+                          nil nil (or filename "")))
     (setq mm-default-directory (file-name-directory file))
     (and (or (not (file-exists-p file))
 	     (yes-or-no-p (format "File %s already exists; overwrite? "