diff options
Diffstat (limited to 'src/bytecode.c')
-rw-r--r-- | src/bytecode.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 0d06890eabf..e6f84cc6c2b 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -37,7 +37,7 @@ by Hallvard: #include <config.h> #include "lisp.h" #include "buffer.h" -#include "charset.h" +#include "character.h" #include "syntax.h" #include "window.h" @@ -1422,10 +1422,17 @@ If the third argument is incorrect, Emacs may crash. */) break; case Bchar_syntax: - BEFORE_POTENTIAL_GC (); - CHECK_NUMBER (TOP); - AFTER_POTENTIAL_GC (); - XSETFASTINT (TOP, syntax_code_spec[(int) SYNTAX (XINT (TOP))]); + { + int c; + + BEFORE_POTENTIAL_GC (); + CHECK_CHARACTER (TOP); + AFTER_POTENTIAL_GC (); + c = XFASTINT (TOP); + if (NILP (current_buffer->enable_multibyte_characters)) + MAKE_CHAR_MULTIBYTE (c); + XSETFASTINT (TOP, syntax_code_spec[(int) SYNTAX (c)]); + } break; case Bbuffer_substring: |