Subject: Re: bug#19946: 24.4; js-mode, indentation

From: Dmitry Gutov <[email-masked]>
Date: Mon, 21 Mar 2016 02:32:38 +0200

On 03/21/2016 02:08 AM, Daniel Colascione wrote:

> It don't have any problem teaching specific modes about carriage
> returns, but this approach doesn't scale.

What about putting that mapping into the standard syntax table?

> A better approach, I think,
> would be to extend something like ws-butler for dealing with
> mixed-line-ending files. On load, we'd transform `\r\n' -> `\n', but
> *remember* which `\n's represent `\r\n` and perform the reverse
> translation when writing. This way, you'd preserve clowny extra carriage
> returns from other people, but see a clean, unified view in Emacs.

And yet another way is to use Git's automatic crlf conversion.