[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mm-with-unibyte-current-buffer
From: |
Katsumi Yamaoka |
Subject: |
mm-with-unibyte-current-buffer |
Date: |
Mon, 10 May 2010 16:26:29 +0900 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
I've redefined the `mm-with-unibyte-current-buffer' macro so as
not to bind the default value of `enable-multibyte-characters' to
nil, since it is no longer allowed (causes an error actually) in
Emacs 24. Formerly it did in a multibyte buffer:
(letf (((default-value 'enable-multibyte-characters) nil))
(set-buffer-multibyte nil)
bla bla bla
(set-buffer-multibyte t))
Now it only does:
(set-buffer-multibyte nil)
bla bla bla
(set-buffer-multibyte t)
The main purpose of having bound it seems to make a unibyte buffer
with `generate-new-buffer', `with-temp-buffer', etc.
Anyway changing the multibyteness of a buffer may cause a serious
trouble to buffer's contents especially if there are multibyte or
8-bit characters. Though many Gnus modules still use the macro;
I'm not capable to fix them all. Due to this change some of them
may malfunction. Please report it together with a recipe; I may
be able to fix it or may not.
,----
| mm-with-unibyte-current-buffer is a Lisp macro in `mm-util.el'.
|
| (mm-with-unibyte-current-buffer &rest FORMS)
|
| Evaluate FORMS with current buffer temporarily made unibyte.
| Equivalent to `progn' in XEmacs.
|
| Note: We recommend not using this macro any more; there should be
| better ways to do a similar thing. The previous version of this macro
| bound the default value of `enable-multibyte-characters' to nil while
| evaluating FORMS but it is no longer done. So, some programs assuming
| it if any may malfunction.
`----
- mm-with-unibyte-current-buffer,
Katsumi Yamaoka <=