]> git.eshelyaron.com Git - emacs.git/commitdiff
(mm-with-unibyte-buffer, mm-with-multibyte-buffer):
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Apr 2008 20:15:57 +0000 (20:15 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Apr 2008 20:15:57 +0000 (20:15 +0000)
Prefer mm-(en|dis)able-multibyte to default-enable-multibyte-characters.

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

index 028a015a2797feec77a672a2fd93747ae0cfec68..029e0351f614475bd3ab4c5bd98dbdc3690af43b 100644 (file)
@@ -1,5 +1,8 @@
 2008-04-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * mm-util.el (mm-with-unibyte-buffer, mm-with-multibyte-buffer):
+       Prefer mm-(en|dis)able-multibyte to default-enable-multibyte-characters.
+
        * nnheader.el (nnheader-init-server-buffer): Change buffer's multibyteness
        after rather than before erasing it.
 
index 510a8c955580c3e7ac964732aa4a3d03eac44a01..7a944bbc1d8fc1c92b6fc32c8e378eb4faefb89a 100644 (file)
@@ -1053,16 +1053,18 @@ charset, and a longer list means no appropriate charset."
 (defmacro mm-with-unibyte-buffer (&rest forms)
   "Create a temporary buffer, and evaluate FORMS there like `progn'.
 Use unibyte mode for this."
-  `(let (default-enable-multibyte-characters)
-     (with-temp-buffer ,@forms)))
+  `(with-temp-buffer
+     (mm-disable-multibyte)
+     ,@forms))
 (put 'mm-with-unibyte-buffer 'lisp-indent-function 0)
 (put 'mm-with-unibyte-buffer 'edebug-form-spec '(body))
 
 (defmacro mm-with-multibyte-buffer (&rest forms)
   "Create a temporary buffer, and evaluate FORMS there like `progn'.
 Use multibyte mode for this."
-  `(let ((default-enable-multibyte-characters t))
-     (with-temp-buffer ,@forms)))
+  `(with-temp-buffer
+     (mm-enable-multibyte)
+     ,@forms))
 (put 'mm-with-multibyte-buffer 'lisp-indent-function 0)
 (put 'mm-with-multibyte-buffer 'edebug-form-spec '(body))