changeset 24215:6e1f6e29422a

(decode_mode_spec_coding): Fix previous change.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 28 Jan 1999 16:30:23 +0000
parents 4fb0bce809bc
children 45e1b3418311
files src/xdisp.c
diffstat 1 files changed, 23 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Thu Jan 28 04:52:02 1999 +0000
+++ b/src/xdisp.c	Thu Jan 28 16:30:23 1999 +0000
@@ -4566,6 +4566,10 @@
 {
   Lisp_Object val;
   int multibyte = !NILP (current_buffer->enable_multibyte_characters);
+  unsigned char *eol_str;
+  int eol_str_len;
+  /* The EOL conversion we are using.  */
+  Lisp_Object eoltype;
 
   val = coding_system;
 
@@ -4574,7 +4578,7 @@
       if (multibyte)
 	*buf++ = '-';
       if (eol_flag)
-	*buf++ = eol_mnemonic_undecided;
+	eoltype = eol_mnemonic_undecided;
       /* Don't mention EOL conversion if it isn't decided.  */
     }
   else
@@ -4595,10 +4599,6 @@
 
       if (eol_flag)
 	{
-	  unsigned char *eol_str;
-	  int eol_str_len;
-	  /* The EOL conversion we are using.  */
-	  Lisp_Object eoltype;
 	  /* The EOL conversion that is normal on this system.  */
 
 	  if (NILP (eolvalue))	/* Not yet decided.  */
@@ -4610,22 +4610,26 @@
 		       ? eol_mnemonic_unix
 		       : (XFASTINT (eolvalue) == 1
 			  ? eol_mnemonic_dos : eol_mnemonic_mac));
-
-	  /* Mention the EOL conversion if it is not the usual one.  */
-	  if (STRINGP (eoltype))
-	    {
-	      eol_str = XSTRING (eoltype)->data;
-	      eol_str_len = XSTRING (eoltype)->size;
-	    }
-	  else
-	    {
-	      eol_str = invalid_eol_type;
-	      eol_str_len = sizeof (invalid_eol_type) - 1;
-	    }
-	  strcpy (buf, eol_str);
-	  buf += eol_str_len;
 	}
     }
+
+  if (eol_flag)
+    {
+      /* Mention the EOL conversion if it is not the usual one.  */
+      if (STRINGP (eoltype))
+	{
+	  eol_str = XSTRING (eoltype)->data;
+	  eol_str_len = XSTRING (eoltype)->size;
+	}
+      else
+	{
+	  eol_str = invalid_eol_type;
+	  eol_str_len = sizeof (invalid_eol_type) - 1;
+	}
+      strcpy (buf, eol_str);
+      buf += eol_str_len;
+    }
+
   return buf;
 }