aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii1999-01-28 16:30:23 +0000
committerEli Zaretskii1999-01-28 16:30:23 +0000
commit302f2b38d094e3e8fae4af48d6c41314e757935b (patch)
treea44e96db13a127a7410261632d6059824c7bf441 /src
parent5ca0cd71d39c87064ba3946cc1d1eb9b7e912aac (diff)
downloademacs-302f2b38d094e3e8fae4af48d6c41314e757935b.tar.gz
emacs-302f2b38d094e3e8fae4af48d6c41314e757935b.zip
(decode_mode_spec_coding): Fix previous change.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 79eee049108..f8705200f00 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4566,6 +4566,10 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
4566{ 4566{
4567 Lisp_Object val; 4567 Lisp_Object val;
4568 int multibyte = !NILP (current_buffer->enable_multibyte_characters); 4568 int multibyte = !NILP (current_buffer->enable_multibyte_characters);
4569 unsigned char *eol_str;
4570 int eol_str_len;
4571 /* The EOL conversion we are using. */
4572 Lisp_Object eoltype;
4569 4573
4570 val = coding_system; 4574 val = coding_system;
4571 4575
@@ -4574,7 +4578,7 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
4574 if (multibyte) 4578 if (multibyte)
4575 *buf++ = '-'; 4579 *buf++ = '-';
4576 if (eol_flag) 4580 if (eol_flag)
4577 *buf++ = eol_mnemonic_undecided; 4581 eoltype = eol_mnemonic_undecided;
4578 /* Don't mention EOL conversion if it isn't decided. */ 4582 /* Don't mention EOL conversion if it isn't decided. */
4579 } 4583 }
4580 else 4584 else
@@ -4595,10 +4599,6 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
4595 4599
4596 if (eol_flag) 4600 if (eol_flag)
4597 { 4601 {
4598 unsigned char *eol_str;
4599 int eol_str_len;
4600 /* The EOL conversion we are using. */
4601 Lisp_Object eoltype;
4602 /* The EOL conversion that is normal on this system. */ 4602 /* The EOL conversion that is normal on this system. */
4603 4603
4604 if (NILP (eolvalue)) /* Not yet decided. */ 4604 if (NILP (eolvalue)) /* Not yet decided. */
@@ -4610,22 +4610,26 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
4610 ? eol_mnemonic_unix 4610 ? eol_mnemonic_unix
4611 : (XFASTINT (eolvalue) == 1 4611 : (XFASTINT (eolvalue) == 1
4612 ? eol_mnemonic_dos : eol_mnemonic_mac)); 4612 ? eol_mnemonic_dos : eol_mnemonic_mac));
4613 }
4614 }
4613 4615
4614 /* Mention the EOL conversion if it is not the usual one. */ 4616 if (eol_flag)
4615 if (STRINGP (eoltype)) 4617 {
4616 { 4618 /* Mention the EOL conversion if it is not the usual one. */
4617 eol_str = XSTRING (eoltype)->data; 4619 if (STRINGP (eoltype))
4618 eol_str_len = XSTRING (eoltype)->size; 4620 {
4619 } 4621 eol_str = XSTRING (eoltype)->data;
4620 else 4622 eol_str_len = XSTRING (eoltype)->size;
4621 { 4623 }
4622 eol_str = invalid_eol_type; 4624 else
4623 eol_str_len = sizeof (invalid_eol_type) - 1; 4625 {
4624 } 4626 eol_str = invalid_eol_type;
4625 strcpy (buf, eol_str); 4627 eol_str_len = sizeof (invalid_eol_type) - 1;
4626 buf += eol_str_len;
4627 } 4628 }
4629 strcpy (buf, eol_str);
4630 buf += eol_str_len;
4628 } 4631 }
4632
4629 return buf; 4633 return buf;
4630} 4634}
4631 4635