[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using empty_string as the only "" string
From: |
Kenichi Handa |
Subject: |
Re: using empty_string as the only "" string |
Date: |
Wed, 25 Apr 2007 20:56:38 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.0 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
In article <address@hidden>, "dmantipov" <address@hidden> writes:
> > You can modify the multibyteness of an empty string, and a
> > unibyte empty string and a multibyte empty string behave a
> > little bit differently, for instance, when concatinated with
> > an unibyte 8-bit string.
> How you can modify the multibyteness of an empty string?
Ah, sorry, my mistake. But your change make it impossible
to make an empty multibyte string.
> You can't aset
> multibyte char (as well as anything else) into empty string, and conversion
> functions like 'string-make-unibyte' or 'string-to-multibyte' always creates
> new strings instead of touching an argument. Moreover, since "" is a
> no-op in concatenation operations, it may be silently discarded without
> looking into internal structure, isn't it ?
Unfortunately no. Currently Emacs behaves as this:
(concat "" "\300") => "\300"
(concat (string-to-multibyte "") "\300") => "$(D*"(B"
Of course, with more changes to alloc.c, we can keep unique
multibyte empty string and unique unibyte empty string.
But, is it really worth working on that?
---
Kenichi Handa
address@hidden
- Re: Using empty_string as the only "" string, (continued)
Re: Using empty_string as the only "" string, Richard Stallman, 2007/04/24
Re: Using empty_string as the only "" string, Stefan Monnier, 2007/04/24
Re: Using empty_string as the only "" string, Richard Stallman, 2007/04/24
Re: using empty_string as the only "" string, dmantipov, 2007/04/25
Re: using empty_string as the only "" string, Richard Stallman, 2007/04/26
- Re: using empty_string as the only "" string, Dmitry Antipov, 2007/04/26
- Re: using empty_string as the only "" string, Richard Stallman, 2007/04/27
- Re: using empty_string as the only "" string, Dmitry Antipov, 2007/04/27
- Re: using empty_string as the only "" string, David Kastrup, 2007/04/27
- Re: using empty_string as the only "" string, Richard Stallman, 2007/04/28
- Re: using empty_string as the only "" string, Dmitry Antipov, 2007/04/28
- Re: using empty_string as the only "" string, Richard Stallman, 2007/04/28