Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Cc: emacs-devel@gnu.org
Subject: mm-with-unibyte-current-buffer
Date: Mon, 10 May 2010 16:26:29 +0900	[thread overview]
Message-ID: <b4m39y0jjyy.fsf@jpl.org> (raw)

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)

The main purpose of having bound it seems to make a unibyte buffer
with `generate-new-buffer', `with-temp-buffer', etc.

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.  Though many Gnus modules still use the macro;
I'm not capable to fix them all.  Due to this change some of them
may malfunction.  Please report it together with a recipe; I may
be able to fix it or may not.

,----
| mm-with-unibyte-current-buffer is a Lisp macro in `mm-util.el'.
|
| (mm-with-unibyte-current-buffer &rest FORMS)
|
| Evaluate FORMS with current buffer temporarily made unibyte.
| Equivalent to `progn' in XEmacs.
|
| Note: We recommend not using this macro any more; there should be
| better ways to do a similar thing.  The previous version of this macro
| bound the default value of `enable-multibyte-characters' to nil while
| evaluating FORMS but it is no longer done.  So, some programs assuming
| it if any may malfunction.
`----



             reply	other threads:[~2010-05-10  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10  7:26 Katsumi Yamaoka [this message]
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       ` 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=b4m39y0jjyy.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.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).