[Top][All Lists]

[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 20:19:16 +0300

> Date: Mon, 10 May 2010 16:26:29 +0900
> From: Katsumi Yamaoka <address@hidden>
> Cc: address@hidden
> 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)

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.

> 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.

Like what?  I thought we are way past this kind of trouble in Emacs 23.

reply via email to

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