# HG changeset patch # User james # Date 1060699627 0 # Node ID 1038bc1b8cb94c0069c6b3b21badff0cff8fa834 # Parent 000fb15e7f54f0a07017c22892403c7555ffc2f5 [xemacs-hg @ 2003-08-12 14:47:07 by james] Andrew Begel's patch to make newlines prettier in DOC. diff -r 000fb15e7f54 -r 1038bc1b8cb9 lib-src/ChangeLog --- a/lib-src/ChangeLog Tue Aug 12 06:36:38 2003 +0000 +++ b/lib-src/ChangeLog Tue Aug 12 14:47:07 2003 +0000 @@ -1,3 +1,8 @@ +2003-06-30 Andrew Begel + + * make-docfile.c (write_c_args): Escape newlines that arise in the + C argument list, and comment on synch with Emacs. + 2003-06-01 Steve Youngs * XEmacs 21.5.14 "cassava" is released. diff -r 000fb15e7f54 -r 1038bc1b8cb9 lib-src/make-docfile.c --- 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')