all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: yamaoka@jpl.org, ding@gnus.org, emacs-devel@gnu.org
Subject: Re: mm-with-unibyte-current-buffer
Date: Mon, 10 May 2010 21:02:18 -0400	[thread overview]
Message-ID: <jwviq6v9rsp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83tyqfppab.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 10 May 2010 21:47:24 +0300")

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



  reply	other threads:[~2010-05-11  1:02 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       ` Stefan Monnier [this message]
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=jwviq6v9rsp.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=ding@gnus.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.