Fix Fchar_syntax for non-ASCII in unibyte buffers
authorMattias Engdegård <mattiase@acm.org>
Sun, 16 Jan 2022 10:58:00 +0000 (11:58 +0100)
committerMattias Engdegård <mattiase@acm.org>
Thu, 20 Jan 2022 10:44:07 +0000 (11:44 +0100)
commitb929bdaeb6bcb919d4d1a5d02713cdcac3fc44d0
tree8b0ee1ce3c8a355b67ac46ee26c3ec064997afc6
parentb1488a6582d8557e3e3fd894d81bab165d4aca77
Fix Fchar_syntax for non-ASCII in unibyte buffers

Fchar_syntax did not convert unibyte characters to multibyte when the
current buffer was unibyte, in contrast to `char-syntax` in
byte-compiled code (bug#53260).

* src/bytecode.c (exec_byte_code): Call out to Fchar_syntax;
the dynamic frequency is too low to justify inlining here, and it
did lead to implementations diverging.
* src/syntax.c (Fchar_syntax): Convert non-ASCII unibyte values to
multibyte.
* test/src/syntax-tests.el (syntax-char-syntax): New test.
src/bytecode.c
src/syntax.c
test/src/syntax-tests.el