bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#10857: ucs-insert deals inconsistently with errors


From: Juanma Barranquero
Subject: bug#10857: ucs-insert deals inconsistently with errors
Date: Tue, 21 Feb 2012 02:25:47 +0100

On Tue, Feb 21, 2012 at 01:37, Juri Linkov <juri@jurta.org> wrote:

> Wouldn't it be too weird for `read-char-by-name' to return "zzz"
> when the purpose of this function is to return a character,
> not a string the user typed.

Yes. I don't think `read-char-by-name' should return "zzz", I think
`ucs-insert' should not say the "nil" part. Perhaps just "Not a
Unicode character".

>> The second problem can be trivially fixed with
>> (not (string-match-p "[^[:xdigit:]]" character)),
>
> In `read-char-by-name', the condition for this purpose is:
>
>  (string-match-p "^[0-9a-fA-F]+$" input)

They are equivalent, aren't they? But my point was that the docstring
does not say what to expect in CHARACTER.

    Juanma





reply via email to

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