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

From: Drew Adams <[email-masked]>
Date: Mon, 10 Sep 2018 06:43:07 -0700 (PDT)

> > Perhaps there is no bug here, other than incomplete or insufficiently
> > clear doc.  Dunno.
> 
> It's a documentation bug.
>
> > 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'.
> 
> What the documentation failed to make clear is that the value returned
> by these functions is an _event_, not a character.  For ASCII
> characters, the event and the character are identical, but modifier
> bits that cannot be resolved to yield an ASCII character are left in
> the returned value, and that makes the value not a valid character
> code.
> 
> I have now clarified this subtle point in the documentation (on the
> emacs-26 branch).

Thank you.

> > And what function reads a `characterp' character, either ignoring
> > anything else or raising an error for anything else?
> 
> What do you mean by "reading a 'characterp'"?

I said "reads a `characterp' character", meaning reads an event
that satisfies `characterp'. Apparently the functions whose names
or doc suggests that they read a character do not necessarily
return something that satisfies `characterp'.

> E.g., if the user types
> C-% or M-a, what 'characterp' code would you expect to see?

I was asking for a function that insists on getting an event that
satisfies `characterp', i.e., that keeps reading events until it does.

> Also, does "reading a 'characterp'" include supporting input methods, if
> any?

Sorry, can't answer that. I know nothing about input methods.