(mm-with-unibyte-current-buffer): Add note.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 28 Feb 2006 23:47:44 +0000 (23:47 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 28 Feb 2006 23:47:44 +0000 (23:47 +0000)
lisp/ChangeLog
lisp/mm-util.el

index d42e247..0776a66 100644 (file)
@@ -1,3 +1,7 @@
+2006-02-28  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-util.el (mm-with-unibyte-current-buffer): Add note.
+
 2006-02-28  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-art.el (gnus-button): New face.
 2006-02-28  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-art.el (gnus-button): New face.
@@ -51,7 +55,7 @@
        (nnweb-gmane-wash-article, nnweb-gmane-search): Fix Gmane web
        groups.  Kudos to Olly Betts <olly@survex.com> for providing NOV
        output on the server side.
        (nnweb-gmane-wash-article, nnweb-gmane-search): Fix Gmane web
        groups.  Kudos to Olly Betts <olly@survex.com> for providing NOV
        output on the server side.
-        (nnweb-google-create-mapping): Update regexps and add some
+       (nnweb-google-create-mapping): Update regexps and add some
        progress indication.
 
 2006-02-23  Reiner Steib  <Reiner.Steib@gmx.de>
        progress indication.
 
 2006-02-23  Reiner Steib  <Reiner.Steib@gmx.de>
index 4c778ae..46c1773 100644 (file)
@@ -893,11 +893,17 @@ Use multibyte mode for this."
 (defmacro mm-with-unibyte-current-buffer (&rest forms)
   "Evaluate FORMS with current buffer temporarily made unibyte.
 Also bind `default-enable-multibyte-characters' to nil.
 (defmacro mm-with-unibyte-current-buffer (&rest forms)
   "Evaluate FORMS with current buffer temporarily made unibyte.
 Also bind `default-enable-multibyte-characters' to nil.
-Equivalent to `progn' in XEmacs"
+Equivalent to `progn' in XEmacs
+
+NOTE: Use this macro with caution in multibyte buffers (it is not
+worth using this macro in unibyte buffers of course).  Use of
+`(set-buffer-multibyte t)', which is run finally, is generally
+harmful since it is likely to modify existing data in the buffer.
+For instance, it converts \"\\300\\255\" into \"\\255\" in Emacs 23."
   (let ((multibyte (make-symbol "multibyte"))
        (buffer (make-symbol "buffer")))
     `(if mm-emacs-mule
   (let ((multibyte (make-symbol "multibyte"))
        (buffer (make-symbol "buffer")))
     `(if mm-emacs-mule
-        (let ((,multibyte enable-multibyte-characters)
+        (let ((,multibyte enable-multibyte-characters)
               (,buffer (current-buffer)))
           (unwind-protect
               (let (default-enable-multibyte-characters)
               (,buffer (current-buffer)))
           (unwind-protect
               (let (default-enable-multibyte-characters)