diff options
| author | Miles Bader | 2007-10-12 21:06:27 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-10-12 21:06:27 +0000 |
| commit | 985773c9038f9847f9e7362f3b5fb0c8acac13a2 (patch) | |
| tree | 12d10cb76729ccbdc5ace4688d15f83894a70cc9 /src | |
| parent | 47632e43ca42e26da139289f1e0f4f69e8c140fd (diff) | |
| download | emacs-985773c9038f9847f9e7362f3b5fb0c8acac13a2.tar.gz emacs-985773c9038f9847f9e7362f3b5fb0c8acac13a2.zip | |
Fix up multi-tty merge
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-261
Creator: Stefan Monnier <monnier@iro.umontreal.ca>
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog.10 | 5 | ||||
| -rw-r--r-- | src/ChangeLog.unicode | 49 | ||||
| -rw-r--r-- | src/Makefile.in | 11 | ||||
| -rw-r--r-- | src/alloc.c | 50 | ||||
| -rw-r--r-- | src/chartab.c | 5 | ||||
| -rw-r--r-- | src/coding.c | 22 | ||||
| -rw-r--r-- | src/coding.h | 3 | ||||
| -rw-r--r-- | src/doc.c | 4 | ||||
| -rw-r--r-- | src/emacs.c | 15 | ||||
| -rw-r--r-- | src/fontset.c | 2 | ||||
| -rw-r--r-- | src/lread.c | 4 | ||||
| -rw-r--r-- | src/term.c | 1 | ||||
| -rw-r--r-- | src/terminal.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 144 | ||||
| -rw-r--r-- | src/xfaces.c | 4 | ||||
| -rw-r--r-- | src/xterm.c | 40 |
16 files changed, 189 insertions, 174 deletions
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index f0e0f191b9a..c5e7bc61e47 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 | |||
| @@ -12403,6 +12403,11 @@ | |||
| 12403 | * regex.c (re_error_msgid): Add an entry for REG_ERANGEX. | 12403 | * regex.c (re_error_msgid): Add an entry for REG_ERANGEX. |
| 12404 | (regex_compile): Return REG_ERANGEX if appropriate. | 12404 | (regex_compile): Return REG_ERANGEX if appropriate. |
| 12405 | 12405 | ||
| 12406 | 2004-10-22 Kenichi Handa <handa@m17n.org> | ||
| 12407 | |||
| 12408 | * editfns.c (Ftranslate_region_internal): New function. | ||
| 12409 | (syms_of_editfns): Defsubr it. | ||
| 12410 | |||
| 12406 | 2004-10-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 12411 | 2004-10-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 12407 | 12412 | ||
| 12408 | * xfns.c (xic_create_xfontset): Initialize missing_list to NULL. | 12413 | * xfns.c (xic_create_xfontset): Initialize missing_list to NULL. |
diff --git a/src/ChangeLog.unicode b/src/ChangeLog.unicode index b3f20c24a55..345890b36db 100644 --- a/src/ChangeLog.unicode +++ b/src/ChangeLog.unicode | |||
| @@ -1,3 +1,52 @@ | |||
| 1 | 2007-10-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | Fix up multy-tty merge. | ||
| 4 | |||
| 5 | * xterm.c (handle_one_xevent): Remove duplicate code and fix up nesting | ||
| 6 | and indentation. | ||
| 7 | |||
| 8 | * xfaces.c (free_realized_face, clear_face_gcs): | ||
| 9 | Include font_done_for_face in the input_blocked section, just in case. | ||
| 10 | |||
| 11 | * xdisp.c (decode_mode_spec): Use terminal-local coding systems. | ||
| 12 | (get_char_face_and_encoding): Undo last change and remove the *other* | ||
| 13 | duplicate definition (i.e. keep the one that's better scoped and that | ||
| 14 | includes code for the font-backend). | ||
| 15 | |||
| 16 | * terminal.c (create_terminal): Default keyboard_coding to | ||
| 17 | `no-conversion' and terminal_coding to `undecided'. | ||
| 18 | |||
| 19 | * lread.c (read1): Use XSETPVECTYPE to set a pseudovector's tag. | ||
| 20 | |||
| 21 | * fontset.c (free_realized_fontsets): Check that the table entry does | ||
| 22 | contain a fontset before trying to compare it to `base'. | ||
| 23 | |||
| 24 | * emacs.c (main): Move syms_of_data, syms_of_fileio, syms_of_alloc, | ||
| 25 | syms_of_charset, and syms_of_coding earlier because init_window_once | ||
| 26 | now needs Vcoding_system_hash_table to be setup. | ||
| 27 | |||
| 28 | * coding.h (default_buffer_file_coding): Remove. | ||
| 29 | |||
| 30 | * coding.c (default_buffer_file_coding): Remove. | ||
| 31 | (Fterminal_coding_system, Fkeyboard_coding_system): Use ->id rather | ||
| 32 | than ->symbol, and use the terminal-local coding system. | ||
| 33 | (syms_of_coding): Don't setup the coding-systems that are not | ||
| 34 | terminal-local. | ||
| 35 | (Fdefine_coding_system_internal): Use XCAR/XCDR. | ||
| 36 | |||
| 37 | * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table): | ||
| 38 | Use XSETPVECTYPE now that XSETCHAR_TABLE doesn't set the tag anymore. | ||
| 39 | |||
| 40 | * alloc.c (Fmake_char_table, make_sub_char_table): Remove. They're now | ||
| 41 | in chartab.c and were re-added here by mistake. | ||
| 42 | (Fpurecopy): Use XSETPVECTYPE after copying a COMPILED pseudovector. | ||
| 43 | |||
| 44 | * doc.c (Fsnarf_documentation): | ||
| 45 | * Makefile.in (temacs${EXEEXT}, mostlyclean): Move buildobj.lst from | ||
| 46 | src to etc. | ||
| 47 | |||
| 48 | * ChangeLog.10: Add mistakenly removed entry. | ||
| 49 | |||
| 1 | 2007-10-12 Dan Nicolaescu <dann@ics.uci.edu> | 50 | 2007-10-12 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 51 | ||
| 3 | * Makefile.in (fringe.o, minibuf.o): Fix dependencies. | 52 | * Makefile.in (fringe.o, minibuf.o): Fix dependencies. |
diff --git a/src/Makefile.in b/src/Makefile.in index c73f402f228..6fce595a9ec 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -1007,7 +1007,7 @@ ${lispsource}international/charprop.el: temacs${EXEEXT} ${UNIDATA} | |||
| 1007 | #endif | 1007 | #endif |
| 1008 | 1008 | ||
| 1009 | temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} | 1009 | temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} |
| 1010 | echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst | 1010 | echo "${obj} ${otherobj} " OBJECTS_MACHINE > ${etc}buildobj.lst |
| 1011 | $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ | 1011 | $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ |
| 1012 | -o temacs ${STARTFILES} ${obj} ${otherobj} \ | 1012 | -o temacs ${STARTFILES} ${obj} ${otherobj} \ |
| 1013 | OBJECTS_MACHINE ${LIBES} | 1013 | OBJECTS_MACHINE ${LIBES} |
| @@ -1133,7 +1133,7 @@ ecrt0.o: ecrt0.c $(config_h) | |||
| 1133 | CRT0_COMPILE ${srcdir}/ecrt0.c | 1133 | CRT0_COMPILE ${srcdir}/ecrt0.c |
| 1134 | dired.o: dired.c commands.h buffer.h $(config_h) character.h charset.h \ | 1134 | dired.o: dired.c commands.h buffer.h $(config_h) character.h charset.h \ |
| 1135 | coding.h regex.h systime.h blockinput.h atimer.h | 1135 | coding.h regex.h systime.h blockinput.h atimer.h |
| 1136 | dispnew.o: dispnew.c systty.h systime.h commands.h process.h frame.h \ | 1136 | dispnew.o: dispnew.c systime.h commands.h process.h frame.h \ |
| 1137 | window.h buffer.h dispextern.h termchar.h termopts.h termhooks.h cm.h \ | 1137 | window.h buffer.h dispextern.h termchar.h termopts.h termhooks.h cm.h \ |
| 1138 | disptab.h indent.h intervals.h \ | 1138 | disptab.h indent.h intervals.h \ |
| 1139 | xterm.h blockinput.h atimer.h character.h msdos.h composite.h keyboard.h \ | 1139 | xterm.h blockinput.h atimer.h character.h msdos.h composite.h keyboard.h \ |
| @@ -1288,11 +1288,10 @@ fns.o: fns.c commands.h $(config_h) frame.h buffer.h character.h keyboard.h \ | |||
| 1288 | keymap.h frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h md5.h \ | 1288 | keymap.h frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h md5.h \ |
| 1289 | blockinput.h atimer.h systime.h xterm.h termhooks.h | 1289 | blockinput.h atimer.h systime.h xterm.h termhooks.h |
| 1290 | print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \ | 1290 | print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \ |
| 1291 | $(config_h) dispextern.h termchar.h $(INTERVAL_SRC) msdos.h composite.h \ | 1291 | $(config_h) dispextern.h termchar.h $(INTERVAL_SRC) msdos.h composite.h \ |
| 1292 | blockinput.h atimer.h systime.h | 1292 | blockinput.h atimer.h systime.h |
| 1293 | lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \ | 1293 | lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \ |
| 1294 | charset.h $(config_h) $(INTERVAL_SRC) termhooks.h coding.h msdos.h \ | 1294 | charset.h $(config_h) $(INTERVAL_SRC) termhooks.h coding.h msdos.h |
| 1295 | blockinput.h atimer.h systime.h | ||
| 1296 | 1295 | ||
| 1297 | /* Text properties support */ | 1296 | /* Text properties support */ |
| 1298 | textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVAL_SRC) \ | 1297 | textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVAL_SRC) \ |
| @@ -1357,7 +1356,7 @@ mostlyclean: | |||
| 1357 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a | 1356 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a |
| 1358 | rm -f ../etc/DOC | 1357 | rm -f ../etc/DOC |
| 1359 | rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} | 1358 | rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} |
| 1360 | rm -f buildobj.lst | 1359 | rm -f ${etc}buildobj.lst |
| 1361 | clean: mostlyclean | 1360 | clean: mostlyclean |
| 1362 | rm -f emacs-*${EXEEXT} emacs${EXEEXT} | 1361 | rm -f emacs-*${EXEEXT} emacs${EXEEXT} |
| 1363 | /**/# This is used in making a distribution. | 1362 | /**/# This is used in making a distribution. |
diff --git a/src/alloc.c b/src/alloc.c index fccdf2a88a7..ed003af3ea8 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3070,51 +3070,6 @@ See also the function `vector'. */) | |||
| 3070 | } | 3070 | } |
| 3071 | 3071 | ||
| 3072 | 3072 | ||
| 3073 | DEFUN ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0, | ||
| 3074 | doc: /* Return a newly created char-table, with purpose PURPOSE. | ||
| 3075 | Each element is initialized to INIT, which defaults to nil. | ||
| 3076 | PURPOSE should be a symbol which has a `char-table-extra-slots' property. | ||
| 3077 | The property's value should be an integer between 0 and 10. */) | ||
| 3078 | (purpose, init) | ||
| 3079 | register Lisp_Object purpose, init; | ||
| 3080 | { | ||
| 3081 | Lisp_Object vector; | ||
| 3082 | Lisp_Object n; | ||
| 3083 | CHECK_SYMBOL (purpose); | ||
| 3084 | n = Fget (purpose, Qchar_table_extra_slots); | ||
| 3085 | CHECK_NUMBER (n); | ||
| 3086 | if (XINT (n) < 0 || XINT (n) > 10) | ||
| 3087 | args_out_of_range (n, Qnil); | ||
| 3088 | /* Add 2 to the size for the defalt and parent slots. */ | ||
| 3089 | vector = Fmake_vector (make_number (CHAR_TABLE_STANDARD_SLOTS + XINT (n)), | ||
| 3090 | init); | ||
| 3091 | XSETPVECTYPE (XVECTOR (vector), PVEC_CHAR_TABLE); | ||
| 3092 | XCHAR_TABLE (vector)->top = Qt; | ||
| 3093 | XCHAR_TABLE (vector)->parent = Qnil; | ||
| 3094 | XCHAR_TABLE (vector)->purpose = purpose; | ||
| 3095 | XSETCHAR_TABLE (vector, XCHAR_TABLE (vector)); | ||
| 3096 | return vector; | ||
| 3097 | } | ||
| 3098 | |||
| 3099 | |||
| 3100 | /* Return a newly created sub char table with slots initialized by INIT. | ||
| 3101 | Since a sub char table does not appear as a top level Emacs Lisp | ||
| 3102 | object, we don't need a Lisp interface to make it. */ | ||
| 3103 | |||
| 3104 | Lisp_Object | ||
| 3105 | make_sub_char_table (init) | ||
| 3106 | Lisp_Object init; | ||
| 3107 | { | ||
| 3108 | Lisp_Object vector | ||
| 3109 | = Fmake_vector (make_number (SUB_CHAR_TABLE_STANDARD_SLOTS), init); | ||
| 3110 | XSETPVECTYPE (XVECTOR (vector), PVEC_CHAR_TABLE); | ||
| 3111 | XCHAR_TABLE (vector)->top = Qnil; | ||
| 3112 | XCHAR_TABLE (vector)->defalt = Qnil; | ||
| 3113 | XSETCHAR_TABLE (vector, XCHAR_TABLE (vector)); | ||
| 3114 | return vector; | ||
| 3115 | } | ||
| 3116 | |||
| 3117 | |||
| 3118 | DEFUN ("vector", Fvector, Svector, 0, MANY, 0, | 3073 | DEFUN ("vector", Fvector, Svector, 0, MANY, 0, |
| 3119 | doc: /* Return a newly created vector with specified arguments as elements. | 3074 | doc: /* Return a newly created vector with specified arguments as elements. |
| 3120 | Any number of arguments, even zero arguments, are allowed. | 3075 | Any number of arguments, even zero arguments, are allowed. |
| @@ -4964,7 +4919,10 @@ Does not copy symbols. Copies strings without text properties. */) | |||
| 4964 | for (i = 0; i < size; i++) | 4919 | for (i = 0; i < size; i++) |
| 4965 | vec->contents[i] = Fpurecopy (XVECTOR (obj)->contents[i]); | 4920 | vec->contents[i] = Fpurecopy (XVECTOR (obj)->contents[i]); |
| 4966 | if (COMPILEDP (obj)) | 4921 | if (COMPILEDP (obj)) |
| 4967 | XSETCOMPILED (obj, vec); | 4922 | { |
| 4923 | XSETPVECTYPE (vec, PVEC_COMPILED); | ||
| 4924 | XSETCOMPILED (obj, vec); | ||
| 4925 | } | ||
| 4968 | else | 4926 | else |
| 4969 | XSETVECTOR (obj, vec); | 4927 | XSETVECTOR (obj, vec); |
| 4970 | return obj; | 4928 | return obj; |
diff --git a/src/chartab.c b/src/chartab.c index 021b163618d..5306e22cefc 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -7,7 +7,7 @@ This file is part of GNU Emacs. | |||
| 7 | 7 | ||
| 8 | GNU Emacs is free software; you can redistribute it and/or modify | 8 | GNU Emacs is free software; you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by | 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation; either version 2, or (at your option) | 10 | the Free Software Foundation; either version 3, or (at your option) |
| 11 | any later version. | 11 | any later version. |
| 12 | 12 | ||
| 13 | GNU Emacs is distributed in the hope that it will be useful, | 13 | GNU Emacs is distributed in the hope that it will be useful, |
| @@ -85,6 +85,7 @@ the char-table has no extra slot. */) | |||
| 85 | 85 | ||
| 86 | size = VECSIZE (struct Lisp_Char_Table) - 1 + n_extras; | 86 | size = VECSIZE (struct Lisp_Char_Table) - 1 + n_extras; |
| 87 | vector = Fmake_vector (make_number (size), init); | 87 | vector = Fmake_vector (make_number (size), init); |
| 88 | XSETPVECTYPE (XVECTOR (vector), PVEC_CHAR_TABLE); | ||
| 88 | XCHAR_TABLE (vector)->parent = Qnil; | 89 | XCHAR_TABLE (vector)->parent = Qnil; |
| 89 | XCHAR_TABLE (vector)->purpose = purpose; | 90 | XCHAR_TABLE (vector)->purpose = purpose; |
| 90 | XSETCHAR_TABLE (vector, XCHAR_TABLE (vector)); | 91 | XSETCHAR_TABLE (vector, XCHAR_TABLE (vector)); |
| @@ -100,6 +101,7 @@ make_sub_char_table (depth, min_char, defalt) | |||
| 100 | int size = VECSIZE (struct Lisp_Sub_Char_Table) - 1 + chartab_size[depth]; | 101 | int size = VECSIZE (struct Lisp_Sub_Char_Table) - 1 + chartab_size[depth]; |
| 101 | 102 | ||
| 102 | table = Fmake_vector (make_number (size), defalt); | 103 | table = Fmake_vector (make_number (size), defalt); |
| 104 | XSETPVECTYPE (XVECTOR (table), PVEC_SUB_CHAR_TABLE); | ||
| 103 | XSUB_CHAR_TABLE (table)->depth = make_number (depth); | 105 | XSUB_CHAR_TABLE (table)->depth = make_number (depth); |
| 104 | XSUB_CHAR_TABLE (table)->min_char = make_number (min_char); | 106 | XSUB_CHAR_TABLE (table)->min_char = make_number (min_char); |
| 105 | XSETSUB_CHAR_TABLE (table, XSUB_CHAR_TABLE (table)); | 107 | XSETSUB_CHAR_TABLE (table, XSUB_CHAR_TABLE (table)); |
| @@ -156,6 +158,7 @@ copy_char_table (table) | |||
| 156 | int i; | 158 | int i; |
| 157 | 159 | ||
| 158 | copy = Fmake_vector (make_number (size), Qnil); | 160 | copy = Fmake_vector (make_number (size), Qnil); |
| 161 | XSETPVECTYPE (XVECTOR (copy), PVEC_CHAR_TABLE); | ||
| 159 | XCHAR_TABLE (copy)->defalt = XCHAR_TABLE (table)->defalt; | 162 | XCHAR_TABLE (copy)->defalt = XCHAR_TABLE (table)->defalt; |
| 160 | XCHAR_TABLE (copy)->parent = XCHAR_TABLE (table)->parent; | 163 | XCHAR_TABLE (copy)->parent = XCHAR_TABLE (table)->parent; |
| 161 | XCHAR_TABLE (copy)->purpose = XCHAR_TABLE (table)->purpose; | 164 | XCHAR_TABLE (copy)->purpose = XCHAR_TABLE (table)->purpose; |
diff --git a/src/coding.c b/src/coding.c index 8ab5a1107aa..2b518b903a4 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -387,9 +387,6 @@ int inherit_process_coding_system; | |||
| 387 | terminal coding system is nil. */ | 387 | terminal coding system is nil. */ |
| 388 | struct coding_system safe_terminal_coding; | 388 | struct coding_system safe_terminal_coding; |
| 389 | 389 | ||
| 390 | /* Default coding system to be used to write a file. */ | ||
| 391 | struct coding_system default_buffer_file_coding; | ||
| 392 | |||
| 393 | Lisp_Object Vfile_coding_system_alist; | 390 | Lisp_Object Vfile_coding_system_alist; |
| 394 | Lisp_Object Vprocess_coding_system_alist; | 391 | Lisp_Object Vprocess_coding_system_alist; |
| 395 | Lisp_Object Vnetwork_coding_system_alist; | 392 | Lisp_Object Vnetwork_coding_system_alist; |
| @@ -8329,9 +8326,10 @@ frame's terminal device. */) | |||
| 8329 | (terminal) | 8326 | (terminal) |
| 8330 | Lisp_Object terminal; | 8327 | Lisp_Object terminal; |
| 8331 | { | 8328 | { |
| 8332 | Lisp_Object coding_system; | 8329 | struct coding_system *terminal_coding |
| 8330 | = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); | ||
| 8331 | Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); | ||
| 8333 | 8332 | ||
| 8334 | coding_system = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1))->symbol; | ||
| 8335 | /* For backward compatibility, return nil if it is `undecided'. */ | 8333 | /* For backward compatibility, return nil if it is `undecided'. */ |
| 8336 | return (! EQ (coding_system, Qundecided) ? coding_system : Qnil); | 8334 | return (! EQ (coding_system, Qundecided) ? coding_system : Qnil); |
| 8337 | } | 8335 | } |
| @@ -8354,11 +8352,13 @@ DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_intern | |||
| 8354 | } | 8352 | } |
| 8355 | 8353 | ||
| 8356 | DEFUN ("keyboard-coding-system", | 8354 | DEFUN ("keyboard-coding-system", |
| 8357 | Fkeyboard_coding_system, Skeyboard_coding_system, 0, 0, 0, | 8355 | Fkeyboard_coding_system, Skeyboard_coding_system, 0, 1, 0, |
| 8358 | doc: /* Return coding system specified for decoding keyboard input. */) | 8356 | doc: /* Return coding system specified for decoding keyboard input. */) |
| 8359 | () | 8357 | (terminal) |
| 8358 | Lisp_Object terminal; | ||
| 8360 | { | 8359 | { |
| 8361 | return CODING_ID_NAME (keyboard_coding.id); | 8360 | return CODING_ID_NAME (TERMINAL_KEYBOARD_CODING |
| 8361 | (get_terminal (terminal, 1))->id); | ||
| 8362 | } | 8362 | } |
| 8363 | 8363 | ||
| 8364 | 8364 | ||
| @@ -8643,11 +8643,11 @@ usage: (define-coding-system-internal ...) */) | |||
| 8643 | else | 8643 | else |
| 8644 | { | 8644 | { |
| 8645 | charset_list = Fcopy_sequence (charset_list); | 8645 | charset_list = Fcopy_sequence (charset_list); |
| 8646 | for (tail = charset_list; !NILP (tail); tail = Fcdr (tail)) | 8646 | for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) |
| 8647 | { | 8647 | { |
| 8648 | struct charset *charset; | 8648 | struct charset *charset; |
| 8649 | 8649 | ||
| 8650 | val = Fcar (tail); | 8650 | val = XCAR (tail); |
| 8651 | CHECK_CHARSET_GET_CHARSET (val, charset); | 8651 | CHECK_CHARSET_GET_CHARSET (val, charset); |
| 8652 | if (EQ (coding_type, Qiso_2022) | 8652 | if (EQ (coding_type, Qiso_2022) |
| 8653 | ? CHARSET_ISO_FINAL (charset) < 0 | 8653 | ? CHARSET_ISO_FINAL (charset) < 0 |
| @@ -9827,8 +9827,6 @@ character."); | |||
| 9827 | Fdefine_coding_system_internal (coding_arg_max, args); | 9827 | Fdefine_coding_system_internal (coding_arg_max, args); |
| 9828 | } | 9828 | } |
| 9829 | 9829 | ||
| 9830 | setup_coding_system (Qno_conversion, &keyboard_coding); | ||
| 9831 | setup_coding_system (Qundecided, &terminal_coding); | ||
| 9832 | setup_coding_system (Qno_conversion, &safe_terminal_coding); | 9830 | setup_coding_system (Qno_conversion, &safe_terminal_coding); |
| 9833 | 9831 | ||
| 9834 | { | 9832 | { |
diff --git a/src/coding.h b/src/coding.h index 573632abb9b..ef464caeadc 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -746,9 +746,6 @@ extern int inherit_process_coding_system; | |||
| 746 | terminal coding system is nil. */ | 746 | terminal coding system is nil. */ |
| 747 | extern struct coding_system safe_terminal_coding; | 747 | extern struct coding_system safe_terminal_coding; |
| 748 | 748 | ||
| 749 | /* Default coding system to be used to write a file. */ | ||
| 750 | extern struct coding_system default_buffer_file_coding; | ||
| 751 | |||
| 752 | /* Default coding systems used for process I/O. */ | 749 | /* Default coding systems used for process I/O. */ |
| 753 | extern Lisp_Object Vdefault_process_coding_system; | 750 | extern Lisp_Object Vdefault_process_coding_system; |
| 754 | 751 | ||
| @@ -617,8 +617,10 @@ the same file name is found in the `doc-directory'. */) | |||
| 617 | int nr_read; | 617 | int nr_read; |
| 618 | char *cp = NULL; | 618 | char *cp = NULL; |
| 619 | char *beg, *end; | 619 | char *beg, *end; |
| 620 | Lisp_Object buildobj = Fexpand_file_name (build_string ("buildobj.lst"), | ||
| 621 | Vdoc_directory); | ||
| 620 | 622 | ||
| 621 | fd = emacs_open ("buildobj.lst", O_RDONLY, 0); | 623 | fd = emacs_open (SDATA (buildobj), O_RDONLY, 0); |
| 622 | if (fd < 0) | 624 | if (fd < 0) |
| 623 | report_file_error ("Opening file buildobj.lst", Qnil); | 625 | report_file_error ("Opening file buildobj.lst", Qnil); |
| 624 | 626 | ||
diff --git a/src/emacs.c b/src/emacs.c index dfe950631b1..94357bb69ce 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1324,7 +1324,6 @@ main (argc, argv | |||
| 1324 | syms_of_macterm (); | 1324 | syms_of_macterm (); |
| 1325 | syms_of_macmenu (); | 1325 | syms_of_macmenu (); |
| 1326 | syms_of_macselect (); | 1326 | syms_of_macselect (); |
| 1327 | syms_of_data (); | ||
| 1328 | syms_of_search (); | 1327 | syms_of_search (); |
| 1329 | syms_of_frame (); | 1328 | syms_of_frame (); |
| 1330 | 1329 | ||
| @@ -1332,6 +1331,16 @@ main (argc, argv | |||
| 1332 | mac_term_init (build_string ("Mac"), NULL, NULL); | 1331 | mac_term_init (build_string ("Mac"), NULL, NULL); |
| 1333 | init_keyboard (); | 1332 | init_keyboard (); |
| 1334 | #endif | 1333 | #endif |
| 1334 | /* Called before syms_of_fileio, because it sets up Qerror_condition. */ | ||
| 1335 | syms_of_data (); | ||
| 1336 | syms_of_fileio (); | ||
| 1337 | /* Before syms_of_coding to initialize Vgc_cons_threshold. */ | ||
| 1338 | syms_of_alloc (); | ||
| 1339 | /* Before syms_of_coding because it initializes Qcharsetp. */ | ||
| 1340 | syms_of_charset (); | ||
| 1341 | /* Before init_window_once, because it sets up the | ||
| 1342 | Vcoding_system_hash_table. */ | ||
| 1343 | syms_of_coding (); /* This should be after syms_of_fileio. */ | ||
| 1335 | 1344 | ||
| 1336 | init_window_once (); /* Init the window system. */ | 1345 | init_window_once (); /* Init the window system. */ |
| 1337 | init_fileio_once (); /* Must precede any path manipulation. */ | 1346 | init_fileio_once (); /* Must precede any path manipulation. */ |
| @@ -1553,7 +1562,6 @@ main (argc, argv | |||
| 1553 | /* Called before init_window_once for Mac OS Classic. */ | 1562 | /* Called before init_window_once for Mac OS Classic. */ |
| 1554 | syms_of_data (); | 1563 | syms_of_data (); |
| 1555 | #endif | 1564 | #endif |
| 1556 | syms_of_alloc (); | ||
| 1557 | syms_of_chartab (); | 1565 | syms_of_chartab (); |
| 1558 | syms_of_lread (); | 1566 | syms_of_lread (); |
| 1559 | syms_of_print (); | 1567 | syms_of_print (); |
| @@ -1574,7 +1582,6 @@ main (argc, argv | |||
| 1574 | syms_of_ccl (); | 1582 | syms_of_ccl (); |
| 1575 | #endif | 1583 | #endif |
| 1576 | syms_of_character (); | 1584 | syms_of_character (); |
| 1577 | syms_of_charset (); | ||
| 1578 | syms_of_cmds (); | 1585 | syms_of_cmds (); |
| 1579 | #ifndef NO_DIR_LIBRARY | 1586 | #ifndef NO_DIR_LIBRARY |
| 1580 | syms_of_dired (); | 1587 | syms_of_dired (); |
| @@ -1583,8 +1590,6 @@ main (argc, argv | |||
| 1583 | syms_of_doc (); | 1590 | syms_of_doc (); |
| 1584 | syms_of_editfns (); | 1591 | syms_of_editfns (); |
| 1585 | syms_of_emacs (); | 1592 | syms_of_emacs (); |
| 1586 | syms_of_fileio (); | ||
| 1587 | syms_of_coding (); /* This should be after syms_of_fileio. */ | ||
| 1588 | #ifdef CLASH_DETECTION | 1593 | #ifdef CLASH_DETECTION |
| 1589 | syms_of_filelock (); | 1594 | syms_of_filelock (); |
| 1590 | #endif /* CLASH_DETECTION */ | 1595 | #endif /* CLASH_DETECTION */ |
diff --git a/src/fontset.c b/src/fontset.c index 9b9fc79b918..a9cf53c4913 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1442,7 +1442,7 @@ free_realized_fontsets (base) | |||
| 1442 | { | 1442 | { |
| 1443 | Lisp_Object this = AREF (Vfontset_table, id); | 1443 | Lisp_Object this = AREF (Vfontset_table, id); |
| 1444 | 1444 | ||
| 1445 | if (EQ (FONTSET_BASE (this), base)) | 1445 | if (CHAR_TABLE_P (this) && EQ (FONTSET_BASE (this), base)) |
| 1446 | { | 1446 | { |
| 1447 | Fclear_face_cache (Qt); | 1447 | Fclear_face_cache (Qt); |
| 1448 | break; | 1448 | break; |
diff --git a/src/lread.c b/src/lread.c index bccdf28b059..3975c0bfcd0 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2324,7 +2324,7 @@ read1 (readcharfun, pch, first_in_list) | |||
| 2324 | tmp = read_vector (readcharfun, 0); | 2324 | tmp = read_vector (readcharfun, 0); |
| 2325 | if (XVECTOR (tmp)->size < CHAR_TABLE_STANDARD_SLOTS) | 2325 | if (XVECTOR (tmp)->size < CHAR_TABLE_STANDARD_SLOTS) |
| 2326 | error ("Invalid size char-table"); | 2326 | error ("Invalid size char-table"); |
| 2327 | XSETCHAR_TABLE (tmp, XCHAR_TABLE (tmp)); | 2327 | XSETPVECTYPE (XVECTOR (tmp), PVEC_CHAR_TABLE); |
| 2328 | return tmp; | 2328 | return tmp; |
| 2329 | } | 2329 | } |
| 2330 | else if (c == '^') | 2330 | else if (c == '^') |
| @@ -2344,7 +2344,7 @@ read1 (readcharfun, pch, first_in_list) | |||
| 2344 | size = XVECTOR (tmp)->size - 2; | 2344 | size = XVECTOR (tmp)->size - 2; |
| 2345 | if (chartab_size [depth] != size) | 2345 | if (chartab_size [depth] != size) |
| 2346 | error ("Invalid size char-table"); | 2346 | error ("Invalid size char-table"); |
| 2347 | XSETSUB_CHAR_TABLE (tmp, XSUB_CHAR_TABLE (tmp)); | 2347 | XSETPVECTYPE (XVECTOR (tmp), PVEC_SUB_CHAR_TABLE); |
| 2348 | return tmp; | 2348 | return tmp; |
| 2349 | } | 2349 | } |
| 2350 | invalid_syntax ("#^^", 3); | 2350 | invalid_syntax ("#^^", 3); |
diff --git a/src/term.c b/src/term.c index b84cea0ee36..fca99bc6c75 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -41,7 +41,6 @@ Boston, MA 02110-1301, USA. */ | |||
| 41 | #include "lisp.h" | 41 | #include "lisp.h" |
| 42 | #include "termchar.h" | 42 | #include "termchar.h" |
| 43 | #include "termopts.h" | 43 | #include "termopts.h" |
| 44 | #include "lisp.h" | ||
| 45 | #include "buffer.h" | 44 | #include "buffer.h" |
| 46 | #include "character.h" | 45 | #include "character.h" |
| 47 | #include "charset.h" | 46 | #include "charset.h" |
diff --git a/src/terminal.c b/src/terminal.c index 46ffb3c2dc8..8b1836b3681 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -242,8 +242,8 @@ create_terminal (void) | |||
| 242 | terminal->terminal_coding = | 242 | terminal->terminal_coding = |
| 243 | (struct coding_system *) xmalloc (sizeof (struct coding_system)); | 243 | (struct coding_system *) xmalloc (sizeof (struct coding_system)); |
| 244 | 244 | ||
| 245 | setup_coding_system (Qnil, terminal->keyboard_coding); | 245 | setup_coding_system (Qno_conversion, terminal->keyboard_coding); |
| 246 | setup_coding_system (Qnil, terminal->terminal_coding); | 246 | setup_coding_system (Qundecided, terminal->terminal_coding); |
| 247 | 247 | ||
| 248 | terminal->param_alist = Qnil; | 248 | terminal->param_alist = Qnil; |
| 249 | return terminal; | 249 | return terminal; |
diff --git a/src/xdisp.c b/src/xdisp.c index 4a093495f37..746fa2540f9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -18210,9 +18210,11 @@ decode_mode_spec (w, c, field_width, precision, multibyte) | |||
| 18210 | { | 18210 | { |
| 18211 | /* No need to mention EOL here--the terminal never needs | 18211 | /* No need to mention EOL here--the terminal never needs |
| 18212 | to do EOL conversion. */ | 18212 | to do EOL conversion. */ |
| 18213 | p = decode_mode_spec_coding (CODING_ID_NAME (keyboard_coding.id), | 18213 | p = decode_mode_spec_coding (CODING_ID_NAME |
| 18214 | (FRAME_KEYBOARD_CODING (f)->id), | ||
| 18214 | p, 0); | 18215 | p, 0); |
| 18215 | p = decode_mode_spec_coding (CODING_ID_NAME (terminal_coding.id), | 18216 | p = decode_mode_spec_coding (CODING_ID_NAME |
| 18217 | (FRAME_TERMINAL_CODING (f)->id), | ||
| 18216 | p, 0); | 18218 | p, 0); |
| 18217 | } | 18219 | } |
| 18218 | p = decode_mode_spec_coding (b->buffer_file_coding_system, | 18220 | p = decode_mode_spec_coding (b->buffer_file_coding_system, |
| @@ -19037,6 +19039,80 @@ append_glyph_string (head, tail, s) | |||
| 19037 | } | 19039 | } |
| 19038 | 19040 | ||
| 19039 | 19041 | ||
| 19042 | /* Get face and two-byte form of character C in face FACE_ID on frame | ||
| 19043 | F. The encoding of C is returned in *CHAR2B. MULTIBYTE_P non-zero | ||
| 19044 | means we want to display multibyte text. DISPLAY_P non-zero means | ||
| 19045 | make sure that X resources for the face returned are allocated. | ||
| 19046 | Value is a pointer to a realized face that is ready for display if | ||
| 19047 | DISPLAY_P is non-zero. */ | ||
| 19048 | |||
| 19049 | static INLINE struct face * | ||
| 19050 | get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p, display_p) | ||
| 19051 | struct frame *f; | ||
| 19052 | int c, face_id; | ||
| 19053 | XChar2b *char2b; | ||
| 19054 | int multibyte_p, display_p; | ||
| 19055 | { | ||
| 19056 | struct face *face = FACE_FROM_ID (f, face_id); | ||
| 19057 | |||
| 19058 | #ifdef USE_FONT_BACKEND | ||
| 19059 | if (enable_font_backend) | ||
| 19060 | { | ||
| 19061 | struct font *font = (struct font *) face->font_info; | ||
| 19062 | |||
| 19063 | if (font) | ||
| 19064 | { | ||
| 19065 | unsigned code = font->driver->encode_char (font, c); | ||
| 19066 | |||
| 19067 | if (code != FONT_INVALID_CODE) | ||
| 19068 | STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF)); | ||
| 19069 | else | ||
| 19070 | STORE_XCHAR2B (char2b, 0, 0); | ||
| 19071 | } | ||
| 19072 | } | ||
| 19073 | else | ||
| 19074 | #endif /* USE_FONT_BACKEND */ | ||
| 19075 | if (!multibyte_p) | ||
| 19076 | { | ||
| 19077 | /* Unibyte case. We don't have to encode, but we have to make | ||
| 19078 | sure to use a face suitable for unibyte. */ | ||
| 19079 | STORE_XCHAR2B (char2b, 0, c); | ||
| 19080 | face_id = FACE_FOR_CHAR (f, face, c, -1, Qnil); | ||
| 19081 | face = FACE_FROM_ID (f, face_id); | ||
| 19082 | } | ||
| 19083 | else if (c < 128) | ||
| 19084 | { | ||
| 19085 | /* Case of ASCII in a face known to fit ASCII. */ | ||
| 19086 | STORE_XCHAR2B (char2b, 0, c); | ||
| 19087 | } | ||
| 19088 | else if (face->font != NULL) | ||
| 19089 | { | ||
| 19090 | struct font_info *font_info | ||
| 19091 | = FONT_INFO_FROM_ID (f, face->font_info_id); | ||
| 19092 | struct charset *charset = CHARSET_FROM_ID (font_info->charset); | ||
| 19093 | unsigned code = ENCODE_CHAR (charset, c); | ||
| 19094 | |||
| 19095 | if (CHARSET_DIMENSION (charset) == 1) | ||
| 19096 | STORE_XCHAR2B (char2b, 0, code); | ||
| 19097 | else | ||
| 19098 | STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF)); | ||
| 19099 | /* Maybe encode the character in *CHAR2B. */ | ||
| 19100 | FRAME_RIF (f)->encode_char (c, char2b, font_info, charset, NULL); | ||
| 19101 | } | ||
| 19102 | |||
| 19103 | /* Make sure X resources of the face are allocated. */ | ||
| 19104 | #ifdef HAVE_X_WINDOWS | ||
| 19105 | if (display_p) | ||
| 19106 | #endif | ||
| 19107 | { | ||
| 19108 | xassert (face != NULL); | ||
| 19109 | PREPARE_FACE_FOR_DISPLAY (f, face); | ||
| 19110 | } | ||
| 19111 | |||
| 19112 | return face; | ||
| 19113 | } | ||
| 19114 | |||
| 19115 | |||
| 19040 | /* Get face and two-byte form of character glyph GLYPH on frame F. | 19116 | /* Get face and two-byte form of character glyph GLYPH on frame F. |
| 19041 | The encoding of GLYPH->u.ch is returned in *CHAR2B. Value is | 19117 | The encoding of GLYPH->u.ch is returned in *CHAR2B. Value is |
| 19042 | a pointer to a realized face that is ready for display. */ | 19118 | a pointer to a realized face that is ready for display. */ |
| @@ -19541,70 +19617,6 @@ right_overwriting (s) | |||
| 19541 | } | 19617 | } |
| 19542 | 19618 | ||
| 19543 | 19619 | ||
| 19544 | /* Get face and two-byte form of character C in face FACE_ID on frame | ||
| 19545 | F. The encoding of C is returned in *CHAR2B. MULTIBYTE_P non-zero | ||
| 19546 | means we want to display multibyte text. DISPLAY_P non-zero means | ||
| 19547 | make sure that X resources for the face returned are allocated. | ||
| 19548 | Value is a pointer to a realized face that is ready for display if | ||
| 19549 | DISPLAY_P is non-zero. */ | ||
| 19550 | |||
| 19551 | static INLINE struct face * | ||
| 19552 | get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p, display_p) | ||
| 19553 | struct frame *f; | ||
| 19554 | int c, face_id; | ||
| 19555 | XChar2b *char2b; | ||
| 19556 | int multibyte_p, display_p; | ||
| 19557 | { | ||
| 19558 | struct face *face = FACE_FROM_ID (f, face_id); | ||
| 19559 | |||
| 19560 | if (!multibyte_p) | ||
| 19561 | { | ||
| 19562 | /* Unibyte case. We don't have to encode, but we have to make | ||
| 19563 | sure to use a face suitable for unibyte. */ | ||
| 19564 | STORE_XCHAR2B (char2b, 0, c); | ||
| 19565 | face_id = FACE_FOR_CHAR (f, face, c, -1, Qnil); | ||
| 19566 | face = FACE_FROM_ID (f, face_id); | ||
| 19567 | } | ||
| 19568 | else if (c < 128) | ||
| 19569 | { | ||
| 19570 | /* Case of ASCII in a face known to fit ASCII. */ | ||
| 19571 | STORE_XCHAR2B (char2b, 0, c); | ||
| 19572 | } | ||
| 19573 | else | ||
| 19574 | { | ||
| 19575 | int c1, c2, charset; | ||
| 19576 | |||
| 19577 | /* Split characters into bytes. If c2 is -1 afterwards, C is | ||
| 19578 | really a one-byte character so that byte1 is zero. */ | ||
| 19579 | SPLIT_CHAR (c, charset, c1, c2); | ||
| 19580 | if (c2 > 0) | ||
| 19581 | STORE_XCHAR2B (char2b, c1, c2); | ||
| 19582 | else | ||
| 19583 | STORE_XCHAR2B (char2b, 0, c1); | ||
| 19584 | |||
| 19585 | /* Maybe encode the character in *CHAR2B. */ | ||
| 19586 | if (face->font != NULL) | ||
| 19587 | { | ||
| 19588 | struct font_info *font_info | ||
| 19589 | = FONT_INFO_FROM_ID (f, face->font_info_id); | ||
| 19590 | if (font_info) | ||
| 19591 | FRAME_RIF (f)->encode_char (c, char2b, font_info, 0); | ||
| 19592 | } | ||
| 19593 | } | ||
| 19594 | |||
| 19595 | /* Make sure X resources of the face are allocated. */ | ||
| 19596 | #ifdef HAVE_X_WINDOWS | ||
| 19597 | if (display_p) | ||
| 19598 | #endif | ||
| 19599 | { | ||
| 19600 | xassert (face != NULL); | ||
| 19601 | PREPARE_FACE_FOR_DISPLAY (f, face); | ||
| 19602 | } | ||
| 19603 | |||
| 19604 | return face; | ||
| 19605 | } | ||
| 19606 | |||
| 19607 | |||
| 19608 | /* Set background width of glyph string S. START is the index of the | 19620 | /* Set background width of glyph string S. START is the index of the |
| 19609 | first glyph following S. LAST_X is the right-most x-position + 1 | 19621 | first glyph following S. LAST_X is the right-most x-position + 1 |
| 19610 | in the drawing area. */ | 19622 | in the drawing area. */ |
diff --git a/src/xfaces.c b/src/xfaces.c index 298e9e52d55..d3e7a105b60 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -5572,11 +5572,11 @@ free_realized_face (f, face) | |||
| 5572 | free_face_fontset (f, face); | 5572 | free_face_fontset (f, face); |
| 5573 | if (face->gc) | 5573 | if (face->gc) |
| 5574 | { | 5574 | { |
| 5575 | BLOCK_INPUT; | ||
| 5575 | #ifdef USE_FONT_BACKEND | 5576 | #ifdef USE_FONT_BACKEND |
| 5576 | if (enable_font_backend && face->font_info) | 5577 | if (enable_font_backend && face->font_info) |
| 5577 | font_done_for_face (f, face); | 5578 | font_done_for_face (f, face); |
| 5578 | #endif /* USE_FONT_BACKEND */ | 5579 | #endif /* USE_FONT_BACKEND */ |
| 5579 | BLOCK_INPUT; | ||
| 5580 | x_free_gc (f, face->gc); | 5580 | x_free_gc (f, face->gc); |
| 5581 | face->gc = 0; | 5581 | face->gc = 0; |
| 5582 | UNBLOCK_INPUT; | 5582 | UNBLOCK_INPUT; |
| @@ -5747,11 +5747,11 @@ clear_face_gcs (c) | |||
| 5747 | struct face *face = c->faces_by_id[i]; | 5747 | struct face *face = c->faces_by_id[i]; |
| 5748 | if (face && face->gc) | 5748 | if (face && face->gc) |
| 5749 | { | 5749 | { |
| 5750 | BLOCK_INPUT; | ||
| 5750 | #ifdef USE_FONT_BACKEND | 5751 | #ifdef USE_FONT_BACKEND |
| 5751 | if (enable_font_backend && face->font_info) | 5752 | if (enable_font_backend && face->font_info) |
| 5752 | font_done_for_face (c->f, face); | 5753 | font_done_for_face (c->f, face); |
| 5753 | #endif /* USE_FONT_BACKEND */ | 5754 | #endif /* USE_FONT_BACKEND */ |
| 5754 | BLOCK_INPUT; | ||
| 5755 | x_free_gc (c->f, face->gc); | 5755 | x_free_gc (c->f, face->gc); |
| 5756 | face->gc = 0; | 5756 | face->gc = 0; |
| 5757 | UNBLOCK_INPUT; | 5757 | UNBLOCK_INPUT; |
diff --git a/src/xterm.c b/src/xterm.c index 363d2183ee5..a1beab492ee 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -6777,32 +6777,20 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6777 | copy_bufptr = coding.destination; | 6777 | copy_bufptr = coding.destination; |
| 6778 | } | 6778 | } |
| 6779 | 6779 | ||
| 6780 | require = decoding_buffer_size (&coding, nbytes); | 6780 | /* Convert the input data to a sequence of |
| 6781 | p = (unsigned char *) alloca (require); | 6781 | character events. */ |
| 6782 | coding.mode |= CODING_MODE_LAST_BLOCK; | 6782 | for (i = 0; i < nbytes; i += len) |
| 6783 | /* We explicitly disable composition handling because | 6783 | { |
| 6784 | key data should not contain any composition sequence. */ | 6784 | if (nchars == nbytes) |
| 6785 | coding.composing = COMPOSITION_DISABLED; | 6785 | c = copy_bufptr[i], len = 1; |
| 6786 | decode_coding (&coding, copy_bufptr, p, nbytes, require); | 6786 | else |
| 6787 | nbytes = coding.produced; | 6787 | c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, |
| 6788 | nchars = coding.produced_char; | 6788 | nbytes - i, len); |
| 6789 | copy_bufptr = p; | 6789 | inev.ie.kind = (SINGLE_BYTE_CHAR_P (c) |
| 6790 | 6790 | ? ASCII_KEYSTROKE_EVENT | |
| 6791 | /* Convert the input data to a sequence of | 6791 | : MULTIBYTE_CHAR_KEYSTROKE_EVENT); |
| 6792 | character events. */ | 6792 | inev.ie.code = c; |
| 6793 | for (i = 0; i < nbytes; i += len) | 6793 | kbd_buffer_store_event_hold (&inev.ie, hold_quit); |
| 6794 | { | ||
| 6795 | if (nchars == nbytes) | ||
| 6796 | c = copy_bufptr[i], len = 1; | ||
| 6797 | else | ||
| 6798 | c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, | ||
| 6799 | nbytes - i, len); | ||
| 6800 | inev.ie.kind = (SINGLE_BYTE_CHAR_P (c) | ||
| 6801 | ? ASCII_KEYSTROKE_EVENT | ||
| 6802 | : MULTIBYTE_CHAR_KEYSTROKE_EVENT); | ||
| 6803 | inev.ie.code = c; | ||
| 6804 | kbd_buffer_store_event_hold (&inev.ie, hold_quit); | ||
| 6805 | } | ||
| 6806 | } | 6794 | } |
| 6807 | 6795 | ||
| 6808 | /* Previous code updated count by nchars rather than nbytes, | 6796 | /* Previous code updated count by nchars rather than nbytes, |