Subject: Re: bug#6212: 23.2; ^S^Q^@ --error--> Wrong type argument: characterp, 67108896

From: Chong Yidong <[email-masked]>
Date: Tue, 18 May 2010 12:42:52 -0400

[email-masked] (Trent W. Buck) writes:

> Attempting to insert a literal ^@ control character worked in 23.1.
> In 23.2, it results in an error: Wrong type argument: characterp,
> 67108896
>
> I am typing C-q C-SPC, in Emacs in Screen in linux's fbcon.  Since ^@ is
> the zeroth character, perhaps this is an off-by-one or overflow error
> somewhere.  The same error occurs when typing C-q C-@.

Yes, I can reproduce this on text-terminals.  It appears to be due to
the following change:

  2009-10-19  Stefan Monnier  <[email-masked]>

    * bindings.el (function-key-map): Map C-@ to C-SPC if C-@ is unbound.

which added the following to bindings.el:

  ;; Hitting C-SPC on text terminals, usually sends the ascii code 0 (aka C-@),
  ;; so we can't distinguish those two keys, but usually we consider C-SPC
  ;; (rather than C-@) as the "canonical" binding.
  (define-key function-key-map [?\C-@] [?\C-\s])

Stefan, could you take a look?  I don't know your original motivation
for this change, so I don't know how to fix it.