From: Kenichi Handa Date: Thu, 17 Feb 2000 08:19:21 +0000 (+0000) Subject: (decode_mode_spec_coding): Delete superfluous code. X-Git-Tag: emacs-pretest-21.0.90~5000 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4a09dee02e347478af9bd303808be810f57210a8;p=emacs.git (decode_mode_spec_coding): Delete superfluous code. Allocate sufficient memory for eol_str in the case that eoltype is Lisp_Int. --- diff --git a/src/ChangeLog b/src/ChangeLog index 26bade582a5..1a9caae17e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,8 @@ 2000-02-17 Kenichi Handa - * xdisp.c (decode_mode_spec_coding): Delete superfluous code. - Allocate sufficient memory for eol_str in the case that eoltype is - Lisp_Int. + * xdisp.c (decode_mode_spec_coding): Delete superfluous code to + avoid infinite error signaling. Allocate sufficient memory for + eol_str in the case that eoltype is Lisp_Int. 2000-02-17 Stefan Monnier diff --git a/src/xdisp.c b/src/xdisp.c index e0206ca7ad3..3a8b8b42e96 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -11993,9 +11993,9 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) /* The EOL conversion we are using. */ Lisp_Object eoltype; - val = coding_system; + val = Fget (coding_system, Qcoding_system); - if (NILP (val)) /* Not yet decided. */ + if (!VECTORP (val)) /* Not yet decided. */ { if (multibyte) *buf++ = '-'; @@ -12009,13 +12009,6 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) 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 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) 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