aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii1999-01-27 10:06:21 +0000
committerEli Zaretskii1999-01-27 10:06:21 +0000
commitd24715e86956620a1f368f6ec660da6a7d510add (patch)
tree6aa56819261e8d3a398643befa5d4047a9d98c90 /src
parent95eada658d1ae6a4456e28b599655d582a207575 (diff)
downloademacs-d24715e86956620a1f368f6ec660da6a7d510add.tar.gz
emacs-d24715e86956620a1f368f6ec660da6a7d510add.zip
(decode_mode_spec_coding): Display the EOL type as a string.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index b609812bda0..79eee049108 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4556,6 +4556,8 @@ pint2str (buf, width, d)
4556 If EOL_FLAG is 1, set also a mnemonic character for end-of-line 4556 If EOL_FLAG is 1, set also a mnemonic character for end-of-line
4557 type of CODING_SYSTEM. Return updated pointer into BUF. */ 4557 type of CODING_SYSTEM. Return updated pointer into BUF. */
4558 4558
4559static char invalid_eol_type[] = "(*invalid*)";
4560
4559static char * 4561static char *
4560decode_mode_spec_coding (coding_system, buf, eol_flag) 4562decode_mode_spec_coding (coding_system, buf, eol_flag)
4561 Lisp_Object coding_system; 4563 Lisp_Object coding_system;
@@ -4593,8 +4595,10 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
4593 4595
4594 if (eol_flag) 4596 if (eol_flag)
4595 { 4597 {
4598 unsigned char *eol_str;
4599 int eol_str_len;
4596 /* The EOL conversion we are using. */ 4600 /* The EOL conversion we are using. */
4597 int eoltype; 4601 Lisp_Object eoltype;
4598 /* The EOL conversion that is normal on this system. */ 4602 /* The EOL conversion that is normal on this system. */
4599 4603
4600 if (NILP (eolvalue)) /* Not yet decided. */ 4604 if (NILP (eolvalue)) /* Not yet decided. */
@@ -4608,7 +4612,18 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
4608 ? eol_mnemonic_dos : eol_mnemonic_mac)); 4612 ? eol_mnemonic_dos : eol_mnemonic_mac));
4609 4613
4610 /* Mention the EOL conversion if it is not the usual one. */ 4614 /* Mention the EOL conversion if it is not the usual one. */
4611 *buf++ = eoltype; 4615 if (STRINGP (eoltype))
4616 {
4617 eol_str = XSTRING (eoltype)->data;
4618 eol_str_len = XSTRING (eoltype)->size;
4619 }
4620 else
4621 {
4622 eol_str = invalid_eol_type;
4623 eol_str_len = sizeof (invalid_eol_type) - 1;
4624 }
4625 strcpy (buf, eol_str);
4626 buf += eol_str_len;
4612 } 4627 }
4613 } 4628 }
4614 return buf; 4629 return buf;