emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs-diffs Digest, Vol 2, Issue 28


From: Kenichi Handa
Subject: Re: Emacs-diffs Digest, Vol 2, Issue 28
Date: Mon, 27 Jan 2003 21:20:00 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Richard Stallman <address@hidden> writes:
>     string-make-multibyte
>     string-as-multibyte
>     string-to-multibyte

> These three are all useful.

>     string-make-unibyte
>     string-as-unibyte
>     string-to-unibyte (perpaps the same as string-as-unibyte, or
>                     it should signal an error if non-ascii,
>                     non-eight-bit-XXX is contained).

> I don't see a need to add string-to-unibyte.

We have string-as/make-multibyte and string-as/make-unibyte.
If one finds string-to-multibyte, it's quite natural that he
also expects string-to-unibyte.  Even if it is an alias of
string-as-unibyte, I think it's worth having it.  And, it's
simpler to have it than saying that we don't have
string-to-unibyte because ... in some place.

And I think it's better that it signals an error as written
above.

>     buffer-make-multibyte
>     buffer-as-multibyte (same as (set-buffer-multibyte BUFFER t))
>     buffer-to-multibyte

> I don't think buffer-make-multibyte and buffer-to-multibyte are
> useful.  What is useful is to have functions to operate on a region in
> a multibyte buffer, transforming the text between these three
> different representations.  (Some of the 6 transformations may be
> meaningless or impossible; we should only support the meaningful
> ones.)

I don't agree with having such function.  I think such a
case is where we have to use decode/encode-coding-region.
Eight-bit chars in a multibyte buffer actually represent
raw-bytes.  Then the operation of turing them to characters
is "decoding", not transforming.

---
Ken'ichi HANDA
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]