[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19946: 24.4; js-mode, indentation
From: |
Dmitry Gutov |
Subject: |
bug#19946: 24.4; js-mode, indentation |
Date: |
Sun, 20 Mar 2016 21:18:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
On 03/20/2016 09:01 PM, Jostein Kjønigsen wrote:
Some modes try to match [\r\n] (like CC Mode), but in general they seem
to be a minority, and even CC Mode doesn't do that consistently.
I really don't see how that argument makes sense.
It's not an argument, it's an observation: clearly we, as a project,
haven't made a decision to properly support mixed-newline files.
By following the cardinal rule of good software, that is produce the
least amont of astonishment, cc-mode does what's right: it produces the
expected outcome, no matter what kind of file it's working with.
Does it? CC Mode still uses $ in a lot of places.
I wonder why ?\r doesn't have whitespace syntax in the first place.
Make ?\r be interpreted as white-space, because once you put Emacs
outside a GNU/Linux system honestly nothing else makes sense. Is there
any specific reason for its current behaviour?
Hmm, does this help?
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 15a52ba..dffdb77 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -578,6 +578,7 @@ js-mode-syntax-table
(c-populate-syntax-table table)
(modify-syntax-entry ?$ "_" table)
(modify-syntax-entry ?` "\"" table)
+ (modify-syntax-entry ?\C-M " " table)
table)
"Syntax table for `js-mode'.")
- bug#19946: 24.4; js-mode, indentation, Simen Heggestøyl, 2016/03/19
- bug#19946: 24.4; js-mode, indentation, Dmitry Gutov, 2016/03/19
- bug#19946: 24.4; js-mode, indentation, Andreas Schwab, 2016/03/20
- bug#19946: 24.4; js-mode, indentation, Jostein Kjønigsen, 2016/03/20
- bug#19946: 24.4; js-mode, indentation,
Dmitry Gutov <=
- bug#19946: 24.4; js-mode, indentation, Jostein Kjønigsen, 2016/03/20
- bug#19946: 24.4; js-mode, indentation, Dmitry Gutov, 2016/03/20
- bug#19946: 24.4; js-mode, indentation, Daniel Colascione, 2016/03/20
- bug#19946: 24.4; js-mode, indentation, Dmitry Gutov, 2016/03/20