# HG changeset patch # User Kenichi Handa # Date 950775379 0 # Node ID c2a9f4621f9a2fd2b008dc7b4f4104e376c46e97 # Parent c727b02df25861a2da32a5a3e2edfb0a15cf4c0c (decode_mode_spec_coding): Delete superfluous code. Allocate sufficient memory for eol_str in the case that eoltype is Lisp_Int. diff -r c727b02df258 -r c2a9f4621f9a src/xdisp.c --- a/src/xdisp.c Thu Feb 17 08:15:20 2000 +0000 +++ b/src/xdisp.c Thu Feb 17 08:16:19 2000 +0000 @@ -11993,9 +11993,9 @@ /* The EOL conversion we are using. */ Lisp_Object eoltype; - val = coding_system; - - if (NILP (val)) /* Not yet decided. */ + val = Fget (coding_system, Qcoding_system); + + if (!VECTORP (val)) /* Not yet decided. */ { if (multibyte) *buf++ = '-'; @@ -12009,13 +12009,6 @@ eolvalue = Fget (coding_system, Qeol_type); - while (!NILP (val) && SYMBOLP (val)) - { - val = Fget (val, Qcoding_system); - if (NILP (eolvalue)) - eolvalue = Fget (val, Qeol_type); - } - if (multibyte) *buf++ = XFASTINT (XVECTOR (val)->contents[1]); @@ -12046,6 +12039,7 @@ else if (INTEGERP (eoltype) && CHAR_VALID_P (XINT (eoltype), 0)) { + eol_str = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH); eol_str_len = CHAR_STRING (XINT (eoltype), eol_str); } else