users@jaxb.java.net

Re: getting rid of ^M characters in XJC generated .java files

From: Ed Mooney <Ed.Mooney_at_sun.com>
Date: Thu, 24 Jul 2003 12:19:12 -0400

Hi Mark,

If all the lines in a file end with \r\n, emacs will display it as a DOS
file and not show the \r. Some of the lines in JAXB generated code,
however, end with just \n, so emacs displays them as Unix files, showing
the \r on lines that have them. I'm not aware of any way to get emacs
not to display this character in a file it thinks is Unix.

You could experiment with adding

    (setq-default buffer-file-coding-system 'undecided-dos)

to your .emacs, but that also controls line-ending style for buffers you
write from emacs.

Regards,
--
Ed Mooney         |Sun Microsystems, Inc.|Time flies like
Java Web Services |UBUR02-201            |an arrow, but
Ed.Mooney_at_Sun.COM |1 Network Drive       |fruit flies like
781-442-0459      |Burlington, MA  01803 |a banana. Groucho
Mark D. Hansen wrote:
> Thanks - that is what I get for using emacs with Windows!  There must be
> a way to configure it to display the Windows system line.separator
> ("\r\n") properly.
>
>
[ ... ]