Next: , Up: Line ends

5.6.1 Automatic CR/LF translation

For existing files, Emacs scans the file to determine the line ending convention as part of the same scan it does to determine the file encoding. Embedded Ctrl-M (ASCII 13) characters and inconsistent line ends can confuse the automatic scanning, and Emacs will present the file in Unix (LF) mode with the Ctrl-M characters displayed as ‘^M’. It does this to be safe, as no data loss will occur if the file is really binary and the Ctrl-M characters are significant.