[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mm-with-unibyte-current-buffer
From: |
Stefan Monnier |
Subject: |
Re: mm-with-unibyte-current-buffer |
Date: |
Mon, 10 May 2010 21:02:18 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> > Binding the value of enable-multibyte-characters may be a no-no, but
>> > _testing_ its value is still possible. So I see no reason to
>> > set-buffer-multibyte unconditionally, because you may already be in a
>> > unibyte buffer.
>> But calling set-buffer-multibyte with the current value is harmless (it
>> checks a returns right away if there's nothing to do; this check might
>> even be faster than doing it in Elisp).
> That's true, but the unconditional call `(set-buffer-multibyte t)' at
> the end of the macro is _not_ harmless, if the buffer was originally a
> unibyte one.
Right, this is "on purpose", IIUC (I don't actually understand what
this macro intends to do, which is why I haven't touched it other than
to add increasingly scary warnings to it).
Stefan