|
From: | Dmitry Gutov |
Subject: | bug#19946: 24.4; js-mode, indentation |
Date: | Mon, 21 Mar 2016 02:32:38 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |