2000-02-17 Kenichi Handa <handa@etl.go.jp>
- * 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 <monnier@cs.yale.edu>
/* 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++ = '-';
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]);
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