aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorTom Tromey2017-01-09 20:42:43 -0700
committerTom Tromey2017-01-13 12:38:36 -0700
commit05fe74bec239bebea84cb6803120321c367d67d3 (patch)
treec97352c290d455c8dadfceeabfd27240db50eaa1 /lisp
parentd018843e0e8065b1c9de9474521db069e1aa0025 (diff)
downloademacs-05fe74bec239bebea84cb6803120321c367d67d3.tar.gz
emacs-05fe74bec239bebea84cb6803120321c367d67d3.zip
Fix two js-mode filling bugs
Bug#19399 and Bug#22431: * lisp/progmodes/js.el (js-mode): Set comment-line-break-function and c-block-comment-start-regexp. * test/lisp/progmodes/js-tests.el: New file.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/js.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index e3f64a8f327..1484b79739f 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3760,6 +3760,8 @@ If one hasn't been set, or if it's stale, prompt for a new one."
3760 c-line-comment-starter "//" 3760 c-line-comment-starter "//"
3761 c-comment-start-regexp "/[*/]\\|\\s!" 3761 c-comment-start-regexp "/[*/]\\|\\s!"
3762 comment-start-skip "\\(//+\\|/\\*+\\)\\s *") 3762 comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
3763 (setq-local comment-line-break-function #'c-indent-new-comment-line)
3764 (setq-local c-block-comment-start-regexp "/\\*")
3763 3765
3764 (setq-local electric-indent-chars 3766 (setq-local electric-indent-chars
3765 (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*". 3767 (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*".