From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
ding@gnus.org, emacs-devel@gnu.org
Subject: Re: mm-with-unibyte-current-buffer
Date: Tue, 11 May 2010 10:29:30 +0900 [thread overview]
Message-ID: <b4md3x3z0n9.fsf@jpl.org> (raw)
In-Reply-To: <83tyqfppab.fsf@gnu.org>
>>>>> Eli Zaretskii wrote:
>> From: Stefan Monnier <monnier@iro.umontreal.ca>
>> Date: Mon, 10 May 2010 13:51:27 -0400
>> Cc: Katsumi Yamaoka <yamaoka@jpl.org>, ding@gnus.org, emacs-devel@gnu.org
>>
>>> 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.
The macro runs `(set-buffer-multibyte nil)' first regardless of
the multibyteness of a buffer whatever data are there, and runs
`(set-buffer-multibyte t)' finally. I don't recall what kind of
data were there, but in the early days of the Emacs 23 development
I saw data were made broken. Did you mean such a trouble will
never happen with the released Emacs versions?
(Note: Gnus supports Emacs 21~24, XEmacs 21.4&21.5, and SXEmacs.)
next prev parent reply other threads:[~2010-05-11 1:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-10 7:26 mm-with-unibyte-current-buffer Katsumi Yamaoka
2010-05-10 17:19 ` mm-with-unibyte-current-buffer Eli Zaretskii
2010-05-10 17:51 ` mm-with-unibyte-current-buffer Stefan Monnier
2010-05-10 18:47 ` mm-with-unibyte-current-buffer Eli Zaretskii
2010-05-11 1:02 ` mm-with-unibyte-current-buffer Stefan Monnier
2010-05-11 1:29 ` Katsumi Yamaoka [this message]
2010-05-11 1:43 ` mm-with-unibyte-current-buffer Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4md3x3z0n9.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=ding@gnus.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).