From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: bug#19399: js mode comment-filling fixlet Date: Sat, 07 Jan 2017 22:17:13 -0700 Message-ID: <877f662krq.fsf@tromey.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1483852706 16173 195.159.176.226 (8 Jan 2017 05:18:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Jan 2017 05:18:26 +0000 (UTC) Cc: 19399@debbugs.gnu.org To: 22431@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 08 06:18:19 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQ5rw-0001yv-H0 for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jan 2017 06:18:12 +0100 Original-Received: from localhost ([::1]:60281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQ5rv-0000Ya-TC for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jan 2017 00:18:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQ5rp-0000Y1-Su for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2017 00:18:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQ5rm-0008Pz-LB for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2017 00:18:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59234) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cQ5rm-0008Pu-Gw for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2017 00:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cQ5rm-00029n-64 for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2017 00:18:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jan 2017 05:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19399 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19399-submit@debbugs.gnu.org id=B19399.14838526578251 (code B ref 19399); Sun, 08 Jan 2017 05:18:02 +0000 Original-Received: (at 19399) by debbugs.gnu.org; 8 Jan 2017 05:17:37 +0000 Original-Received: from localhost ([127.0.0.1]:46398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQ5rN-000290-ES for submit@debbugs.gnu.org; Sun, 08 Jan 2017 00:17:37 -0500 Original-Received: from gproxy2-pub.mail.unifiedlayer.com ([69.89.18.3]:34785) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cQ5rK-00028Y-WE for 19399@debbugs.gnu.org; Sun, 08 Jan 2017 00:17:35 -0500 Original-Received: (qmail 31900 invoked by uid 0); 8 Jan 2017 05:17:27 -0000 Original-Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy2.mail.unifiedlayer.com with SMTP; 8 Jan 2017 05:17:27 -0000 Original-Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id VhHM1u00L2f2jeq01hHQ5z; Sat, 07 Jan 2017 22:17:25 -0700 X-Authority-Analysis: v=2.1 cv=V+Huj4Xi c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IgFoBzBjUZAA:10 a=Ig7MdnTublVQzIT7hiwA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:CC:Subject:To:From; bh=mpqKBSu52ogjrnsWDhfUDya/aU16h7WcP5vcp8fh57E=; b=CLu3ucej35wNERo5SS9Zf/aZf 3a9ziGXJ6/SrB6yUCvg5+pxjMgvEQmmrqghdk6XCzzJD8xzlNty94kQW8GvnBY+F5ohxJzjAad9xc YKWGZhGyBexHMgpb/XTD9X5aE6; Original-Received: from 174-16-146-181.hlrn.qwest.net ([174.16.146.181]:50720 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_1) (envelope-from ) id 1cQ5r8-00071X-O3; Sat, 07 Jan 2017 22:17:22 -0700 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.146.181 X-Exim-ID: 1cQ5r8-00071X-O3 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-146-181.hlrn.qwest.net (bapiya) [174.16.146.181]:50720 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127891 Archived-At: 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 "[]*".