diff options
author | Kenichi Handa <handa@m17n.org> | 2002-09-03 04:06:33 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2002-09-03 04:06:33 +0000 |
commit | 9281d0779766a39f743240e33dd46a1accf0f7fa (patch) | |
tree | 3205660915624123284099c19987f17676186eb0 /src/bytecode.c | |
parent | 1464b3d8a8daa491d146bdf88ffb1fc73ee6422e (diff) | |
download | emacs-9281d0779766a39f743240e33dd46a1accf0f7fa.tar.gz |
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r-- | src/bytecode.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 6c4e34ddaa7..df6eb266eb9 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1433,10 +1433,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: |