Gnus development mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: yamaoka@jpl.org, ding@gnus.org, emacs-devel@gnu.org
Subject: Re: mm-with-unibyte-current-buffer
Date: Mon, 10 May 2010 21:47:24 +0300	[thread overview]
Message-ID: <83tyqfppab.fsf@gnu.org> (raw)
In-Reply-To: <jwvljbrbq95.fsf-monnier+emacs@gnu.org>

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



  reply	other threads:[~2010-05-10 18:47 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     ` Eli Zaretskii [this message]
2010-05-11  1:02       ` mm-with-unibyte-current-buffer Stefan Monnier
2010-05-11  1:29       ` mm-with-unibyte-current-buffer Katsumi Yamaoka
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=83tyqfppab.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yamaoka@jpl.org \
    /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).