Mercurial > emacs
changeset 93728:c963dc42db06
(mm-with-unibyte-buffer, mm-with-multibyte-buffer):
Prefer mm-(en|dis)able-multibyte to default-enable-multibyte-characters.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 05 Apr 2008 20:15:57 +0000 |
parents | 8bfa051b51fe |
children | 8dc921bd7171 |
files | lisp/gnus/ChangeLog lisp/gnus/mm-util.el |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Sat Apr 05 20:14:17 2008 +0000 +++ b/lisp/gnus/ChangeLog Sat Apr 05 20:15:57 2008 +0000 @@ -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.
--- a/lisp/gnus/mm-util.el Sat Apr 05 20:14:17 2008 +0000 +++ b/lisp/gnus/mm-util.el Sat Apr 05 20:15:57 2008 +0000 @@ -1053,16 +1053,18 @@ (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))