Tweak indentation of #foo in js-mode
* lisp/progmodes/js.el (js--proper-indentation): Indent #define (etc) to column 0, but otherwise indent #foo normally (bug#47488).
This commit is contained in:
parent
df2a237775
commit
1b0dc15a0a
1 changed files with 5 additions and 0 deletions
|
@ -2861,6 +2861,11 @@ return nil."
|
|||
((nth 3 parse-status) 0) ; inside string
|
||||
((when (and js-jsx-syntax (not js-jsx--indent-col))
|
||||
(save-excursion (js-jsx--indentation parse-status))))
|
||||
((and (eq (char-after) ?#)
|
||||
(save-excursion
|
||||
(forward-char 1)
|
||||
(looking-at-p cpp-font-lock-keywords-source-directives)))
|
||||
0)
|
||||
((save-excursion (js--beginning-of-macro)) 4)
|
||||
;; Indent array comprehension continuation lines specially.
|
||||
((let ((bracket (nth 1 parse-status))
|
||||
|
|
Loading…
Add table
Reference in a new issue