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

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

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


From: Juri Linkov
Subject: bug#13177: 24.3.50; doc of `read-char-by-name'
Date: Sun, 16 Dec 2012 12:49:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

>>   (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.





reply via email to

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