all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* mm-with-unibyte-current-buffer
@ 2010-05-10  7:26 Katsumi Yamaoka
  2010-05-10 17:19 ` mm-with-unibyte-current-buffer Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2010-05-10  7:26 UTC (permalink / raw)
  To: ding; +Cc: emacs-devel

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-11  1:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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       ` mm-with-unibyte-current-buffer Katsumi Yamaoka
2010-05-11  1:43         ` mm-with-unibyte-current-buffer Katsumi Yamaoka

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.