Subject: js mode comment-filling fixlet

From: Tom Tromey <[email-masked]>
Date: Sat, 07 Jan 2017 22:17:13 -0700

This patch fixes a couple js comment-filling bugs.

Dmitry mentioned comment-line-break-function in bug#22431; this patch
just sets it in js-mode.

For bug#19399, debugging showed that js-mode left
c-block-comment-start-regexp nil, so this sets it to the correct value.

I would normally check this in but I think it should probably be
reviewed.

Tom

diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index e3f64a8..375ae9d 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3760,6 +3760,8 @@ js-mode
         c-line-comment-starter "//"
         c-comment-start-regexp "/[*/]\\|\\s!"
         comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
+  (setq-local comment-line-break-function #'c-indent-new-comment-line)
+  (setq-local c-block-comment-start-regexp "\\*/")
 
   (setq-local electric-indent-chars
 	      (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*".