GNU bug report logs - #22431
25.0.50; incorrect jsdoc comment wrapping in js mode

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Fri, 22 Jan 2016 15:48:01 UTC

Severity: minor

Found in version 25.0.50

Done: Tom Tromey <tom <at> tromey.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 22431 <at> debbugs.gnu.org (full text, mbox):

From: Tom Tromey <tom <at> tromey.com>
To: 22431 <at> debbugs.gnu.org
Cc: 19399 <at> debbugs.gnu.org
Subject: js mode comment-filling fixlet
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 "[]*".




This bug report was last modified 8 years and 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.