emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mm-with-unibyte-current-buffer


From: Eli Zaretskii
Subject: Re: mm-with-unibyte-current-buffer
Date: Mon, 10 May 2010 21:47:24 +0300

> From: Stefan Monnier <address@hidden>
> Date: Mon, 10 May 2010 13:51:27 -0400
> Cc: Katsumi Yamaoka <address@hidden>, address@hidden, address@hidden
> 
> > 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]