* mm-decode.el (mm-save-part): Bind enable-multibyte-characters to t while
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 22 Mar 2004 05:31:57 +0000 (05:31 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 22 Mar 2004 05:31:57 +0000 (05:31 +0000)
 entering a file name using the mm-with-multibyte macro.
 Suggested by Hiroshi Fujishima.

* mm-util.el (mm-with-multibyte): New macro.

lisp/ChangeLog
lisp/mm-decode.el
lisp/mm-util.el

index 3d4aefd..e0d6df2 100644 (file)
@@ -1,3 +1,11 @@
+2004-03-22  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-decode.el (mm-save-part): Bind enable-multibyte-characters to
+       t while entering a file name using the mm-with-multibyte macro.
+       Suggested by Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp>.
+
+       * mm-util.el (mm-with-multibyte): New macro.
+
 2004-03-19  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-mime-recompute-hierarchical-structure): New
index e259120..ccf92c8 100644 (file)
@@ -1089,9 +1089,10 @@ string if you do not like underscores."
       (setq filename (gnus-map-function mm-file-name-rewrite-functions
                                        (file-name-nondirectory filename))))
     (setq file
-         (read-file-name "Save MIME part to: "
-                         (or mm-default-directory default-directory)
-                         nil nil (or filename name "")))
+         (mm-with-multibyte
+           (read-file-name "Save MIME part to: "
+                           (or mm-default-directory default-directory)
+                           nil nil (or filename name ""))))
     (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? "
index c75bf95..875fffe 100644 (file)
@@ -1,5 +1,5 @@
 ;;; mm-util.el --- Utility functions for Mule and low level things
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -626,12 +626,19 @@ Equivalent to `progn' in XEmacs"
 (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body))
 
 (defmacro mm-with-unibyte (&rest forms)
-  "Eval the FORMS with the default value of `enable-multibyte-characters' nil."
+  "Eval the FORMS with the default value of `enable-multibyte-characters' nil."
   `(let (default-enable-multibyte-characters)
      ,@forms))
 (put 'mm-with-unibyte 'lisp-indent-function 0)
 (put 'mm-with-unibyte 'edebug-form-spec '(body))
 
+(defmacro mm-with-multibyte (&rest forms)
+  "Eval the FORMS with the default value of `enable-multibyte-characters' t."
+  `(let ((default-enable-multibyte-characters t))
+     ,@forms))
+(put 'mm-with-multibyte 'lisp-indent-function 0)
+(put 'mm-with-multibyte 'edebug-form-spec '(body))
+
 (defun mm-find-charset-region (b e)
   "Return a list of Emacs charsets in the region B to E."
   (cond