From b2cbffde4b1453a8a1404ef6c2aeb6ed4f1b23b3 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Tue, 28 Feb 2006 23:47:44 +0000 Subject: [PATCH] (mm-with-unibyte-current-buffer): Add note. --- lisp/ChangeLog | 6 +++++- lisp/mm-util.el | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d42e24716..0776a6632 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-02-28 Katsumi Yamaoka + + * mm-util.el (mm-with-unibyte-current-buffer): Add note. + 2006-02-28 Reiner Steib * 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 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 diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 4c778ae71..46c177315 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -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. -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 enable-multibyte-characters) + (let ((,multibyte enable-multibyte-characters) (,buffer (current-buffer))) (unwind-protect (let (default-enable-multibyte-characters) -- 2.25.1