GNU bug report logs - #13177
24.3.50; doc of `read-char-by-name'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 14 Dec 2012 04:03:01 UTC

Severity: minor

Merged with 13195

Found in version 24.3.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 13177 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 13177 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#13177: 24.3.50; doc of `read-char-by-name'
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.




This bug report was last modified 12 years and 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.