diff lib-src/make-docfile.c @ 1618:1038bc1b8cb9

[xemacs-hg @ 2003-08-12 14:47:07 by james] Andrew Begel's patch to make newlines prettier in DOC.
author james
date Tue, 12 Aug 2003 14:47:07 +0000
parents 184461bc8de4
children 04bc9d2f42c7
line wrap: on
line diff
--- a/lib-src/make-docfile.c	Tue Aug 12 06:36:38 2003 +0000
+++ b/lib-src/make-docfile.c	Tue Aug 12 14:47:07 2003 +0000
@@ -22,7 +22,7 @@
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* Synched up with: FSF 21.2. */
+/* Synched up with: FSF 21.3. */
 
 /* The arguments given to this program are all the C and Lisp source files
  of XEmacs.  .elc and .el and .c files are allowed.
@@ -563,8 +563,9 @@
 	 as spaces.  Collapse adjacent spaces into one.  */
       if (c == '_')
 	c = '-';
-      else if (c == ',' || c == '\n')
+      else if (c == ',' /* || c == '\n' */)
 	c = ' ';
+      /* XEmacs change: handle \n below for readability */
 
 #if 0
       /* In C code, `default' is a reserved word, so we spell it
@@ -589,6 +590,18 @@
 	  in_ident = 0;
 	  just_spaced = 0;
 	}
+      /* XEmacs change: if the character is carriage return or linefeed,
+	 escape it for the compiler */
+      else if (c == '\n')
+	{
+	  putc('\\', out);
+	  putc('\n', out);
+	}
+      else if (c == '\r')
+	{
+	  putc('\\', out);
+	  putc('\r', out);
+	}
       else if (c != ' ' || !just_spaced)
 	{
 	  if (c >= 'a' && c <= 'z')