all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Re: mm-with-unibyte-current-buffer
Date: Mon, 10 May 2010 20:19:16 +0300	[thread overview]
Message-ID: <83y6frptd7.fsf@gnu.org> (raw)
In-Reply-To: <b4m39y0jjyy.fsf@jpl.org>

> Date: Mon, 10 May 2010 16:26:29 +0900
> From: Katsumi Yamaoka <yamaoka@jpl.org>
> Cc: emacs-devel@gnu.org
> 
> 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	other threads:[~2010-05-10 17:19 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 ` Eli Zaretskii [this message]
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       ` 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=83y6frptd7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=ding@gnus.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.