diff options
| author | Juanma Barranquero | 2010-10-08 12:14:47 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-10-08 12:14:47 +0200 |
| commit | 4628bef1eea0f60e846fe6b6591725aa92952de9 (patch) | |
| tree | 9d137b8e0964c0b1ebc4afb4e743e35b807d048d /src | |
| parent | 24ac444fbe5d76a7cf09a62b741b9e956ab90d3e (diff) | |
| parent | 2b7c934285417d2eac7a3c603231d22ce7e212d8 (diff) | |
| download | emacs-4628bef1eea0f60e846fe6b6591725aa92952de9.tar.gz emacs-4628bef1eea0f60e846fe6b6591725aa92952de9.zip | |
Merge changes from emacs-23 branch.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 51 | ||||
| -rw-r--r-- | src/buffer.c | 10 | ||||
| -rw-r--r-- | src/callproc.c | 21 | ||||
| -rw-r--r-- | src/coding.c | 48 | ||||
| -rw-r--r-- | src/coding.h | 1 | ||||
| -rw-r--r-- | src/dbusbind.c | 10 | ||||
| -rw-r--r-- | src/keyboard.c | 5 | ||||
| -rw-r--r-- | src/process.c | 36 | ||||
| -rw-r--r-- | src/xfont.c | 2 |
9 files changed, 144 insertions, 40 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2effe2ea84c..0bde3bb19fe 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,54 @@ | |||
| 1 | 2010-10-08 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * coding.c (complement_process_encoding_system): Fix previous change. | ||
| 4 | |||
| 5 | 2010-10-08 Michael Albinus <michael.albinus@gmx.de> | ||
| 6 | |||
| 7 | * dbusbind.c (syms_of_dbusbind): Move putenv call ... | ||
| 8 | (Fdbus_init_bus): ... here. (Bug#7113) | ||
| 9 | |||
| 10 | 2010-10-08 Glenn Morris <rgm@gnu.org> | ||
| 11 | |||
| 12 | * buffer.c (before-change-functions, after-change-functions): | ||
| 13 | Three-year overdue doc fix following 2007-08-13 change. | ||
| 14 | |||
| 15 | 2010-10-08 Kenichi Handa <handa@m17n.org> | ||
| 16 | |||
| 17 | * coding.c (coding_inherit_eol_type): If parent doesn't specify | ||
| 18 | eol-format, inherit from the system's default. | ||
| 19 | (complement_process_encoding_system): Make a new coding system | ||
| 20 | inherit the original eol-format. | ||
| 21 | |||
| 22 | 2010-10-08 Kenichi Handa <handa@m17n.org> | ||
| 23 | |||
| 24 | * coding.c (complement_process_encoding_system): New function. | ||
| 25 | |||
| 26 | * coding.h (complement_process_encoding_system): Extern it. | ||
| 27 | |||
| 28 | * callproc.c (Fcall_process): Complement the coding system for | ||
| 29 | encoding arguments. | ||
| 30 | (Fcall_process_region): Complement the coding system for encoding | ||
| 31 | the input to the process. | ||
| 32 | |||
| 33 | * process.c (Fstart_process): Complement the coding system for | ||
| 34 | encoding arguments. | ||
| 35 | (send_process): Complement the coding system for encoding what | ||
| 36 | sent to the process. | ||
| 37 | |||
| 38 | 2010-10-08 Kenichi Handa <handa@m17n.org> | ||
| 39 | |||
| 40 | * xfont.c (xfont_open): Fix setting of font->average_width from | ||
| 41 | :avgwidth property (Bug#7123). | ||
| 42 | |||
| 43 | 2010-10-08 Michael Albinus <michael.albinus@gmx.de> | ||
| 44 | |||
| 45 | * dbusbind.c (syms_of_dbusbind): Use putenv instead of setenv, it | ||
| 46 | is more portable. | ||
| 47 | |||
| 48 | * keyboard.c (gobble_input): Move call of xd_read_queued_messages ... | ||
| 49 | (kbd_buffer_get_event): ... here. This is needed for cygwin, which | ||
| 50 | has not defined SIGIO. | ||
| 51 | |||
| 1 | 2010-10-08 Chong Yidong <cyd@stupidchicken.com> | 52 | 2010-10-08 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 53 | ||
| 3 | * xterm.c (x_draw_relief_rect): If box width is larger than 1, | 54 | * xterm.c (x_draw_relief_rect): If box width is larger than 1, |
diff --git a/src/buffer.c b/src/buffer.c index 3f087d62a5f..ed3b7acd2ac 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5957,10 +5957,7 @@ No information is given about the length of the text after the change. | |||
| 5957 | 5957 | ||
| 5958 | Buffer changes made while executing the `before-change-functions' | 5958 | Buffer changes made while executing the `before-change-functions' |
| 5959 | don't call any before-change or after-change functions. | 5959 | don't call any before-change or after-change functions. |
| 5960 | That's because these variables are temporarily set to nil. | 5960 | That's because `inhibit-modification-hooks' is temporarily set non-nil. |
| 5961 | As a result, a hook function cannot straightforwardly alter the | ||
| 5962 | value of these variables. See the Emacs Lisp manual for a way of | ||
| 5963 | accomplishing an equivalent result by using other variables. | ||
| 5964 | 5961 | ||
| 5965 | If an unhandled error happens in running these functions, | 5962 | If an unhandled error happens in running these functions, |
| 5966 | the variable's value remains nil. That prevents the error | 5963 | the variable's value remains nil. That prevents the error |
| @@ -5978,10 +5975,7 @@ and the post-change beginning and end are at the same place.) | |||
| 5978 | 5975 | ||
| 5979 | Buffer changes made while executing the `after-change-functions' | 5976 | Buffer changes made while executing the `after-change-functions' |
| 5980 | don't call any before-change or after-change functions. | 5977 | don't call any before-change or after-change functions. |
| 5981 | That's because these variables are temporarily set to nil. | 5978 | That's because `inhibit-modification-hooks' is temporarily set non-nil. |
| 5982 | As a result, a hook function cannot straightforwardly alter the | ||
| 5983 | value of these variables. See the Emacs Lisp manual for a way of | ||
| 5984 | accomplishing an equivalent result by using other variables. | ||
| 5985 | 5979 | ||
| 5986 | If an unhandled error happens in running these functions, | 5980 | If an unhandled error happens in running these functions, |
| 5987 | the variable's value remains nil. That prevents the error | 5981 | the variable's value remains nil. That prevents the error |
diff --git a/src/callproc.c b/src/callproc.c index 29e13bbc4a7..ee0872b5562 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -254,21 +254,16 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 254 | if (!NILP (Vcoding_system_for_write)) | 254 | if (!NILP (Vcoding_system_for_write)) |
| 255 | val = Vcoding_system_for_write; | 255 | val = Vcoding_system_for_write; |
| 256 | else if (! must_encode) | 256 | else if (! must_encode) |
| 257 | val = Qnil; | 257 | val = Qraw_text; |
| 258 | else | 258 | else |
| 259 | { | 259 | { |
| 260 | args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); | 260 | args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); |
| 261 | args2[0] = Qcall_process; | 261 | args2[0] = Qcall_process; |
| 262 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; | 262 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; |
| 263 | coding_systems = Ffind_operation_coding_system (nargs + 1, args2); | 263 | coding_systems = Ffind_operation_coding_system (nargs + 1, args2); |
| 264 | if (CONSP (coding_systems)) | 264 | val = CONSP (coding_systems) ? XCDR (coding_systems) : Qnil; |
| 265 | val = XCDR (coding_systems); | ||
| 266 | else if (CONSP (Vdefault_process_coding_system)) | ||
| 267 | val = XCDR (Vdefault_process_coding_system); | ||
| 268 | else | ||
| 269 | val = Qnil; | ||
| 270 | } | 265 | } |
| 271 | val = coding_inherit_eol_type (val, Qnil); | 266 | val = complement_process_encoding_system (val); |
| 272 | setup_coding_system (Fcheck_coding_system (val), &argument_coding); | 267 | setup_coding_system (Fcheck_coding_system (val), &argument_coding); |
| 273 | coding_attrs = CODING_ID_ATTRS (argument_coding.id); | 268 | coding_attrs = CODING_ID_ATTRS (argument_coding.id); |
| 274 | if (NILP (CODING_ATTR_ASCII_COMPAT (coding_attrs))) | 269 | if (NILP (CODING_ATTR_ASCII_COMPAT (coding_attrs))) |
| @@ -912,20 +907,16 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 912 | if (!NILP (Vcoding_system_for_write)) | 907 | if (!NILP (Vcoding_system_for_write)) |
| 913 | val = Vcoding_system_for_write; | 908 | val = Vcoding_system_for_write; |
| 914 | else if (NILP (current_buffer->enable_multibyte_characters)) | 909 | else if (NILP (current_buffer->enable_multibyte_characters)) |
| 915 | val = Qnil; | 910 | val = Qraw_text; |
| 916 | else | 911 | else |
| 917 | { | 912 | { |
| 918 | args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); | 913 | args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); |
| 919 | args2[0] = Qcall_process_region; | 914 | args2[0] = Qcall_process_region; |
| 920 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; | 915 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; |
| 921 | coding_systems = Ffind_operation_coding_system (nargs + 1, args2); | 916 | coding_systems = Ffind_operation_coding_system (nargs + 1, args2); |
| 922 | if (CONSP (coding_systems)) | 917 | val = CONSP (coding_systems) ? XCDR (coding_systems) : Qnil; |
| 923 | val = XCDR (coding_systems); | ||
| 924 | else if (CONSP (Vdefault_process_coding_system)) | ||
| 925 | val = XCDR (Vdefault_process_coding_system); | ||
| 926 | else | ||
| 927 | val = Qnil; | ||
| 928 | } | 918 | } |
| 919 | val = complement_process_encoding_system (val); | ||
| 929 | 920 | ||
| 930 | { | 921 | { |
| 931 | int count1 = SPECPDL_INDEX (); | 922 | int count1 = SPECPDL_INDEX (); |
diff --git a/src/coding.c b/src/coding.c index d6285ed9245..2cf32360096 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -6016,10 +6016,9 @@ raw_text_coding_system (Lisp_Object coding_system) | |||
| 6016 | } | 6016 | } |
| 6017 | 6017 | ||
| 6018 | 6018 | ||
| 6019 | /* If CODING_SYSTEM doesn't specify end-of-line format but PARENT | 6019 | /* If CODING_SYSTEM doesn't specify end-of-line format, return one of |
| 6020 | does, return one of the subsidiary that has the same eol-spec as | 6020 | the subsidiary that has the same eol-spec as PARENT (if it is not |
| 6021 | PARENT. Otherwise, return CODING_SYSTEM. If PARENT is nil, | 6021 | nil and specifies end-of-line format) or the system's setting |
| 6022 | inherit end-of-line format from the system's setting | ||
| 6023 | (system_eol_type). */ | 6022 | (system_eol_type). */ |
| 6024 | 6023 | ||
| 6025 | Lisp_Object | 6024 | Lisp_Object |
| @@ -6041,6 +6040,8 @@ coding_inherit_eol_type (Lisp_Object coding_system, Lisp_Object parent) | |||
| 6041 | 6040 | ||
| 6042 | parent_spec = CODING_SYSTEM_SPEC (parent); | 6041 | parent_spec = CODING_SYSTEM_SPEC (parent); |
| 6043 | parent_eol_type = AREF (parent_spec, 2); | 6042 | parent_eol_type = AREF (parent_spec, 2); |
| 6043 | if (VECTORP (parent_eol_type)) | ||
| 6044 | parent_eol_type = system_eol_type; | ||
| 6044 | } | 6045 | } |
| 6045 | else | 6046 | else |
| 6046 | parent_eol_type = system_eol_type; | 6047 | parent_eol_type = system_eol_type; |
| @@ -6054,6 +6055,45 @@ coding_inherit_eol_type (Lisp_Object coding_system, Lisp_Object parent) | |||
| 6054 | return coding_system; | 6055 | return coding_system; |
| 6055 | } | 6056 | } |
| 6056 | 6057 | ||
| 6058 | |||
| 6059 | /* Check if text-conversion and eol-conversion of CODING_SYSTEM are | ||
| 6060 | decided for writing to a process. If not, complement them, and | ||
| 6061 | return a new coding system. */ | ||
| 6062 | |||
| 6063 | Lisp_Object | ||
| 6064 | complement_process_encoding_system (Lisp_Object coding_system) | ||
| 6065 | { | ||
| 6066 | Lisp_Object coding_base = Qnil, eol_base = Qnil; | ||
| 6067 | Lisp_Object spec, attrs; | ||
| 6068 | int i; | ||
| 6069 | |||
| 6070 | for (i = 0; i < 3; i++) | ||
| 6071 | { | ||
| 6072 | if (i == 1) | ||
| 6073 | coding_system = CDR_SAFE (Vdefault_process_coding_system); | ||
| 6074 | else if (i == 2) | ||
| 6075 | coding_system = preferred_coding_system (); | ||
| 6076 | spec = CODING_SYSTEM_SPEC (coding_system); | ||
| 6077 | if (NILP (spec)) | ||
| 6078 | continue; | ||
| 6079 | attrs = AREF (spec, 0); | ||
| 6080 | if (NILP (coding_base) && ! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) | ||
| 6081 | coding_base = CODING_ATTR_BASE_NAME (attrs); | ||
| 6082 | if (NILP (eol_base) && ! VECTORP (AREF (spec, 2))) | ||
| 6083 | eol_base = coding_system; | ||
| 6084 | if (! NILP (coding_base) && ! NILP (eol_base)) | ||
| 6085 | break; | ||
| 6086 | } | ||
| 6087 | |||
| 6088 | if (i > 0) | ||
| 6089 | /* The original CODING_SYSTEM didn't specify text-conversion or | ||
| 6090 | eol-conversion. Be sure that we return a fully complemented | ||
| 6091 | coding system. */ | ||
| 6092 | coding_system = coding_inherit_eol_type (coding_base, eol_base); | ||
| 6093 | return coding_system; | ||
| 6094 | } | ||
| 6095 | |||
| 6096 | |||
| 6057 | /* Emacs has a mechanism to automatically detect a coding system if it | 6097 | /* Emacs has a mechanism to automatically detect a coding system if it |
| 6058 | is one of Emacs' internal format, ISO2022, SJIS, and BIG5. But, | 6098 | is one of Emacs' internal format, ISO2022, SJIS, and BIG5. But, |
| 6059 | it's impossible to distinguish some coding systems accurately | 6099 | it's impossible to distinguish some coding systems accurately |
diff --git a/src/coding.h b/src/coding.h index 0caa5b2f96f..7233726a250 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -707,6 +707,7 @@ extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, | |||
| 707 | int); | 707 | int); |
| 708 | extern Lisp_Object raw_text_coding_system (Lisp_Object); | 708 | extern Lisp_Object raw_text_coding_system (Lisp_Object); |
| 709 | extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object); | 709 | extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object); |
| 710 | extern Lisp_Object complement_process_encoding_system (Lisp_Object); | ||
| 710 | 711 | ||
| 711 | extern int decode_coding_gap (struct coding_system *, | 712 | extern int decode_coding_gap (struct coding_system *, |
| 712 | EMACS_INT, EMACS_INT); | 713 | EMACS_INT, EMACS_INT); |
diff --git a/src/dbusbind.c b/src/dbusbind.c index 99a157fbc76..683b7cb583b 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -900,6 +900,9 @@ DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0, | |||
| 900 | /* Add bus to list of registered buses. */ | 900 | /* Add bus to list of registered buses. */ |
| 901 | Vdbus_registered_buses = Fcons (bus, Vdbus_registered_buses); | 901 | Vdbus_registered_buses = Fcons (bus, Vdbus_registered_buses); |
| 902 | 902 | ||
| 903 | /* We do not want to abort. */ | ||
| 904 | putenv ("DBUS_FATAL_WARNINGS=0"); | ||
| 905 | |||
| 903 | /* Return. */ | 906 | /* Return. */ |
| 904 | return Qnil; | 907 | return Qnil; |
| 905 | } | 908 | } |
| @@ -2160,12 +2163,11 @@ be called when the D-Bus reply message arrives. */); | |||
| 2160 | doc: /* If non-nil, debug messages of D-Bus bindings are raised. */); | 2163 | doc: /* If non-nil, debug messages of D-Bus bindings are raised. */); |
| 2161 | #ifdef DBUS_DEBUG | 2164 | #ifdef DBUS_DEBUG |
| 2162 | Vdbus_debug = Qt; | 2165 | Vdbus_debug = Qt; |
| 2163 | /* We can also set environment DBUS_VERBOSE=1 in order to see more | 2166 | /* We can also set environment variable DBUS_VERBOSE=1 in order to |
| 2164 | traces. */ | 2167 | see more traces. This requires libdbus-1 to be configured with |
| 2168 | --enable-verbose-mode. */ | ||
| 2165 | #else | 2169 | #else |
| 2166 | Vdbus_debug = Qnil; | 2170 | Vdbus_debug = Qnil; |
| 2167 | /* We do not want to abort. */ | ||
| 2168 | setenv ("DBUS_FATAL_WARNINGS", "0", 1); | ||
| 2169 | #endif | 2171 | #endif |
| 2170 | 2172 | ||
| 2171 | Fprovide (intern_c_string ("dbusbind"), Qnil); | 2173 | Fprovide (intern_c_string ("dbusbind"), Qnil); |
diff --git a/src/keyboard.c b/src/keyboard.c index 9af26cd427d..b284244ac81 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3952,6 +3952,11 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3952 | /* One way or another, wait until input is available; then, if | 3952 | /* One way or another, wait until input is available; then, if |
| 3953 | interrupt handlers have not read it, read it now. */ | 3953 | interrupt handlers have not read it, read it now. */ |
| 3954 | 3954 | ||
| 3955 | #ifdef HAVE_DBUS | ||
| 3956 | /* Read D-Bus messages. */ | ||
| 3957 | xd_read_queued_messages (); | ||
| 3958 | #endif /* HAVE_DBUS */ | ||
| 3959 | |||
| 3955 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ | 3960 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ |
| 3956 | #ifdef SIGIO | 3961 | #ifdef SIGIO |
| 3957 | gobble_input (0); | 3962 | gobble_input (0); |
diff --git a/src/process.c b/src/process.c index 370fb673e84..e1515065957 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1670,6 +1670,11 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1670 | val = XCDR (Vdefault_process_coding_system); | 1670 | val = XCDR (Vdefault_process_coding_system); |
| 1671 | } | 1671 | } |
| 1672 | XPROCESS (proc)->encode_coding_system = val; | 1672 | XPROCESS (proc)->encode_coding_system = val; |
| 1673 | /* Note: At this momemnt, the above coding system may leave | ||
| 1674 | text-conversion or eol-conversion unspecified. They will be | ||
| 1675 | decided after we read output from the process and decode it by | ||
| 1676 | some coding system, or just before we actually send a text to | ||
| 1677 | the process. */ | ||
| 1673 | } | 1678 | } |
| 1674 | 1679 | ||
| 1675 | 1680 | ||
| @@ -1712,6 +1717,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1712 | tem = Fsubstring (tem, make_number (2), Qnil); | 1717 | tem = Fsubstring (tem, make_number (2), Qnil); |
| 1713 | 1718 | ||
| 1714 | { | 1719 | { |
| 1720 | Lisp_Object arg_encoding = Qnil; | ||
| 1715 | struct gcpro gcpro1; | 1721 | struct gcpro gcpro1; |
| 1716 | GCPRO1 (tem); | 1722 | GCPRO1 (tem); |
| 1717 | 1723 | ||
| @@ -1729,9 +1735,14 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1729 | tem = Fcons (args[i], tem); | 1735 | tem = Fcons (args[i], tem); |
| 1730 | CHECK_STRING (XCAR (tem)); | 1736 | CHECK_STRING (XCAR (tem)); |
| 1731 | if (STRING_MULTIBYTE (XCAR (tem))) | 1737 | if (STRING_MULTIBYTE (XCAR (tem))) |
| 1732 | XSETCAR (tem, | 1738 | { |
| 1733 | code_convert_string_norecord | 1739 | if (NILP (arg_encoding)) |
| 1734 | (XCAR (tem), XPROCESS (proc)->encode_coding_system, 1)); | 1740 | arg_encoding = (complement_process_encoding_system |
| 1741 | (XPROCESS (proc)->encode_coding_system)); | ||
| 1742 | XSETCAR (tem, | ||
| 1743 | code_convert_string_norecord | ||
| 1744 | (XCAR (tem), arg_encoding, 1)); | ||
| 1745 | } | ||
| 1735 | } | 1746 | } |
| 1736 | 1747 | ||
| 1737 | UNGCPRO; | 1748 | UNGCPRO; |
| @@ -5529,12 +5540,21 @@ send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, | |||
| 5529 | && !NILP (XBUFFER (object)->enable_multibyte_characters)) | 5540 | && !NILP (XBUFFER (object)->enable_multibyte_characters)) |
| 5530 | || EQ (object, Qt)) | 5541 | || EQ (object, Qt)) |
| 5531 | { | 5542 | { |
| 5543 | p->encode_coding_system | ||
| 5544 | = complement_process_encoding_system (p->encode_coding_system); | ||
| 5532 | if (!EQ (Vlast_coding_system_used, p->encode_coding_system)) | 5545 | if (!EQ (Vlast_coding_system_used, p->encode_coding_system)) |
| 5533 | /* The coding system for encoding was changed to raw-text | 5546 | { |
| 5534 | because we sent a unibyte text previously. Now we are | 5547 | /* The coding system for encoding was changed to raw-text |
| 5535 | sending a multibyte text, thus we must encode it by the | 5548 | because we sent a unibyte text previously. Now we are |
| 5536 | original coding system specified for the current process. */ | 5549 | sending a multibyte text, thus we must encode it by the |
| 5537 | setup_coding_system (p->encode_coding_system, coding); | 5550 | original coding system specified for the current process. |
| 5551 | |||
| 5552 | Another reason we comming here is that the coding system | ||
| 5553 | was just complemented and new one was returned by | ||
| 5554 | complement_process_encoding_system. */ | ||
| 5555 | setup_coding_system (p->encode_coding_system, coding); | ||
| 5556 | Vlast_coding_system_used = p->encode_coding_system; | ||
| 5557 | } | ||
| 5538 | coding->src_multibyte = 1; | 5558 | coding->src_multibyte = 1; |
| 5539 | } | 5559 | } |
| 5540 | else | 5560 | else |
diff --git a/src/xfont.c b/src/xfont.c index 0a7f4a3c97f..d4c6af17c49 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -841,7 +841,7 @@ xfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) | |||
| 841 | 841 | ||
| 842 | val = Ffont_get (font_object, QCavgwidth); | 842 | val = Ffont_get (font_object, QCavgwidth); |
| 843 | if (INTEGERP (val)) | 843 | if (INTEGERP (val)) |
| 844 | font->average_width = XINT (val); | 844 | font->average_width = XINT (val) / 10; |
| 845 | if (font->average_width < 0) | 845 | if (font->average_width < 0) |
| 846 | font->average_width = - font->average_width; | 846 | font->average_width = - font->average_width; |
| 847 | if (font->average_width == 0 | 847 | if (font->average_width == 0 |