emacs-devel
[Top][All Lists]
Advanced

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

Re: (aset UNIBYTE-STRING MULTIBYTE-CHAR)


From: Stefan Monnier
Subject: Re: (aset UNIBYTE-STRING MULTIBYTE-CHAR)
Date: Tue, 12 Feb 2008 21:49:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> Before the unicode merge, this worked:
>   (let ((str "a")) (aset str 0 (decode-char 'ucs #x100)))

> In emacs-unicode-2 branch, there was a discussion about the
> rightness of aset changing the multibyteness of a string,
> and I changed the code to signal an error in the above case.

An error sounds right.

> But, I got reports claiming that the change breaks some of
> already existing Elisp packages.  Although changing the

Details?

> What do you think is the right thing for this matter?

aset on strings is fundamentally problematic, so anything that restricts
it further is good in my book (my own local Emacs disallows them
plainly, and I rarely bump into code that needs it).


        Stefan




reply via email to

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