GNU bug report logs - #6080
Behaviour of `char-syntax' changes when byte-compiled

Previous Next

Package: emacs;

Reported by: Toby Cubitt <toby-dated-1274008215.7ce38e <at> dr-qubit.org>

Date: Sun, 2 May 2010 12:28:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Toby Cubitt <toby-dated-1274008215.7ce38e <at> dr-qubit.org>
Cc: 6080 <at> debbugs.gnu.org
Subject: bug#6080: Behaviour of `char-syntax' changes when byte-compiled
Date: Mon, 03 May 2010 13:05:40 -0400
>   (defun test ()
>     (let ((char 33554464))
>       (message "char: %s" char)
>       (message "syntax: %s" (char-syntax char)))
>     nil)

> (Note that 33554464 is the value of `last-input-event' when a command is
> invoked by the key sequence "S-<SPC>".)

> When the test function is evalled and then run with "M-: (test)", it
> outputs the following in the *Messages* buffer:

> char: 33554464
> syntax: 32
> nil

That's an error: S-SPC is not a char, so the function should signal
an error.

> When the test function is byte-compiled, loaded, and run as before with
> "M-: (test)", it throws an error and produces the following backtrace:

Yes, oddly enough (it probably made sense at some point, of course, but
that point was passed a very long time ago), char-syntax has its own
byte code, so what happens above is that the byte-code version of
char-syntax is not implemented in the exact same way as
char-syntax function.


        Stefan




This bug report was last modified 15 years and 14 days ago.

Previous Next


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