Subject: Re: bug#13177: 24.3.50; doc of `read-char-by-name'

From: Juri Linkov <[email-masked]>
Date: Sun, 16 Dec 2012 12:49:49 +0200

>>   (insert-char (read-char))
>>
>> and type `C-SPC'.  It inserts the character ^@ with the value 0.
>
> That's the correct value for C-SPC.

Yes, I was confused by the docstring of `read-char' that says:

  If the character has modifiers, they are resolved and reflected to the
  character code if possible (e.g. C-SPC -> 0).

But nevertheless `read-char' can return non-characters numbers unacceptable
for `insert-char'.  Currently `read-char-by-name' does the same. e.g.:

  M-: (insert-char (read-char)) RET C-M-SPC

reports:

  (wrong-type-argument characterp 134217728)

and

  M-: (insert-char (read-char-by-name "Insert character (Unicode name or hex): "))
  RET #x8000000 RET

reports the same:

  (wrong-type-argument characterp 134217728)

So we are trying to fix a non-problem.