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

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

bug#32562: 26; `read-char(-exclusive)' and `characterp'


From: Drew Adams
Subject: bug#32562: 26; `read-char(-exclusive)' and `characterp'
Date: Tue, 28 Aug 2018 13:39:20 -0700 (PDT)

Perhaps there is no bug here, other than incomplete or insufficiently
clear doc.  Dunno.

emacs -Q
M-: (setq foo (read-char "Char: "))
M-:

shows: 134217786 (#o1000000072, #x800003a), a number too large
to be `characterp'.  And M-: (characterp foo) ; returns nil.

Same thing for `read-char-exclusive'.

Something seems wrong.  The doc for `read-char(-exclusive)' talks about
reading a character. For `read-char' it says that it raises an error for
a non-char event.  And for `read-char-exclusive' it says that it ignores
non-char events that it reads.

But they both seem to read the event from `M-:' and return its value
(a number). And it is not a character, according to `characterp'.

I'm confused.  Please consider fixing this, at least by clarifying the doc.

Why should a function that reads a character, and either ignores a
non-char or raises an error for a non-char, return a non-character?
And what function reads a `characterp' character, either ignoring
anything else or raising an error for anything else?

In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor `Microsoft Corp.', version 10.0.16299
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





reply via email to

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