From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: Set comment-multi-line in js-mode Resent-From: Nathan Weizenbaum Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Aug 2010 20:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6806@debbugs.gnu.org X-Debbugs-Original-To: submit@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.128103892120539 (code B ref -1); Thu, 05 Aug 2010 20:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Aug 2010 20:08:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh6k5-0005LA-8H for submit@debbugs.gnu.org; Thu, 05 Aug 2010 16:08:41 -0400 Received: from smtp-out.google.com ([74.125.121.35]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh5Ia-0004gG-G8 for submit@debbugs.gnu.org; Thu, 05 Aug 2010 14:36:13 -0400 Received: from kpbe12.cbf.corp.google.com (kpbe12.cbf.corp.google.com [172.25.105.76]) by smtp-out.google.com with ESMTP id o75Iah6Z010173 for ; Thu, 5 Aug 2010 11:36:43 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1281033403; bh=6LBooVCoSUGmf9zIuqFToMmizMk=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=c1T0fWtOIQB2hhon6hb25qa9ik3sJ3bPMY41WlXtS8FO+SPvINWcK41MekPO7vP1z /ZXdzGmEJ641ckdgQ/XyQ== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:date:message-id:subject:from:to:content-type:x-system-of-record; b=c62epSPod4xycVnlqnpP8G9IFy2XDMnoYUzVIJ9B4hhxv9ew2Ba6K+0ht5ht+cOK5 7XQAw7eYzziW9Z+i2xzPw== Received: from qwk4 (qwk4.prod.google.com [10.241.195.132]) by kpbe12.cbf.corp.google.com with ESMTP id o75Iaf6r021977 for ; Thu, 5 Aug 2010 11:36:42 -0700 Received: by qwk4 with SMTP id 4so4899133qwk.0 for ; Thu, 05 Aug 2010 11:36:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.231.11 with SMTP id jo11mr3849721qcb.66.1281033401351; Thu, 05 Aug 2010 11:36:41 -0700 (PDT) Received: by 10.229.13.97 with HTTP; Thu, 5 Aug 2010 11:36:41 -0700 (PDT) Date: Thu, 5 Aug 2010 11:36:41 -0700 Message-ID: From: Nathan Weizenbaum Content-Type: multipart/mixed; boundary=00163630f4bbd54323048d17d41f X-System-Of-Record: true X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Thu, 05 Aug 2010 16:08:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.3 (-) --00163630f4bbd54323048d17d41f Content-Type: multipart/alternative; boundary=00163630f4bbd54315048d17d41d --00163630f4bbd54315048d17d41d Content-Type: text/plain; charset=ISO-8859-1 Package: emacs Version: 24.0.50.1 js-mode doesn't set the comment-multi-line variable. This results in comment-indent-new-line behaving improperly when used in a multi-line comment, which also affects auto-fill-mode, according to the documentation for comment-multi-line. Attached is a patch that sets the variable. --00163630f4bbd54315048d17d41d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Package: emacs
Version: 24.0.50.1

js-mode does= n't set the comment-multi-line variable. This results in comment-indent= -new-line behaving improperly when used in a multi-line comment, which also= affects auto-fill-mode, according to the documentation for comment-multi-l= ine.

Attached is a patch that sets the variable.
--00163630f4bbd54315048d17d41d-- --00163630f4bbd54323048d17d41f Content-Type: text/x-patch; charset=US-ASCII; name="0001-Set-comment-multi-line-in-js-mode.patch" Content-Disposition: attachment; filename="0001-Set-comment-multi-line-in-js-mode.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gchy6ni70 RnJvbSAyNzdkOTZjNjJjZGZiOGIxZDg2MjYzMTcyNGY2NzUxODE1MjU4OGYzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOYXRoYW4gV2VpemVuYmF1bSA8bmV4MzQyQGdtYWlsLmNvbT4K RGF0ZTogVHVlLCAzIEF1ZyAyMDEwIDE3OjQ2OjMzIC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gU2V0 IGNvbW1lbnQtbXVsdGktbGluZSBpbiBqcy1tb2RlLgoKLS0tCiBsaXNwL3Byb2dtb2Rlcy9qcy5l bCB8ICAgIDEgKwogMSBmaWxlcyBjaGFuZ2VkLCAxIGluc2VydGlvbnMoKyksIDAgZGVsZXRpb25z KC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9wcm9nbW9kZXMvanMuZWwgYi9saXNwL3Byb2dtb2Rlcy9q cy5lbAppbmRleCA2YmQ4ZmJjLi4wMjNkMjUzIDEwMDY0NAotLS0gYS9saXNwL3Byb2dtb2Rlcy9q cy5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy9qcy5lbApAQCAtMzMwMiw2ICszMzAyLDcgQEAgS2V5 IGJpbmRpbmdzOgogICAoc2V0cSBjb21tZW50LWVuZCAiIikKICAgKHNldCAobWFrZS1sb2NhbC12 YXJpYWJsZSAnZmlsbC1wYXJhZ3JhcGgtZnVuY3Rpb24pCiAgICAgICAgJ2pzLWMtZmlsbC1wYXJh Z3JhcGgpCisgIChzZXQgKG1ha2UtbG9jYWwtdmFyaWFibGUgJ2NvbW1lbnQtbXVsdGktbGluZSkg dCkKIAogICA7OyBQYXJzZSBjYWNoZQogICAoYWRkLWhvb2sgJ2JlZm9yZS1jaGFuZ2UtZnVuY3Rp b25zICMnanMtLWZsdXNoLWNhY2hlcyB0IHQpCi0tIAoxLjcuMQoK --00163630f4bbd54323048d17d41f-- From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: Set comment-multi-line in js-mode Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Aug 2010 20:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Nathan Weizenbaum Cc: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.128129996816909 (code B ref 6806); Sun, 08 Aug 2010 20:40:03 +0000 Received: (at 6806) by debbugs.gnu.org; 8 Aug 2010 20:39:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiCeW-0004Og-K3 for submit@debbugs.gnu.org; Sun, 08 Aug 2010 16:39:28 -0400 Received: from pantheon-po45.its.yale.edu ([130.132.50.79]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiCeU-0004Oa-BE for 6806@debbugs.gnu.org; Sun, 08 Aug 2010 16:39:26 -0400 Received: from furry (173-9-75-145-NewEngland.hfc.comcastbusiness.net [173.9.75.145]) (authenticated bits=0) by pantheon-po45.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o78Ke57H007610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 8 Aug 2010 16:40:06 -0400 Received: by furry (Postfix, from userid 1000) id B93F0C013; Sun, 8 Aug 2010 16:40:05 -0400 (EDT) From: Chong Yidong References: Date: Sun, 08 Aug 2010 16:40:05 -0400 In-Reply-To: (Nathan Weizenbaum's message of "Thu, 5 Aug 2010 11:36:41 -0700") Message-ID: <87ocdcvnx6.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Nathan Weizenbaum writes: > js-mode doesn't set the comment-multi-line variable. This results in > comment-indent-new-line behaving improperly when used in a multi-line comment, > which also affects auto-fill-mode, according to the documentation for > comment-multi-line. > > Attached is a patch that sets the variable. Could you provide a precise recipe for the problem? From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: Set comment-multi-line in js-mode Resent-From: Nathan Weizenbaum Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Aug 2010 00:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.1281313828574 (code B ref 6806); Mon, 09 Aug 2010 00:31:02 +0000 Received: (at 6806) by debbugs.gnu.org; 9 Aug 2010 00:30:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiGG3-00009D-NJ for submit@debbugs.gnu.org; Sun, 08 Aug 2010 20:30:28 -0400 Received: from smtp-out.google.com ([74.125.121.35]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiFzj-0008ST-9X for 6806@debbugs.gnu.org; Sun, 08 Aug 2010 20:13:36 -0400 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id o790EEho013814 for <6806@debbugs.gnu.org>; Sun, 8 Aug 2010 17:14:14 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1281312854; bh=jTHtM4+DGy2f6M8AmZ2lkfBuQf4=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=t217o2FZzCeNeTogtEpdPShKsTPLkEPXe514JSdaTFbPH0pNA2z3wcIsb2bIthhMv pzteHZrIvXbtrwwW5fp6A== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:x-system-of-record; b=sFk9/8/T2s4PXXE5Adrk1vW6+J1J15drTQBSCxgzVdgKGe+lQH215+XwyZve+2I3k 6QwG3uMZV9JvMwjwJDJAg== Received: from qwd6 (qwd6.prod.google.com [10.241.193.198]) by wpaz37.hot.corp.google.com with ESMTP id o790DiEd018732 for <6806@debbugs.gnu.org>; Sun, 8 Aug 2010 17:14:13 -0700 Received: by qwd6 with SMTP id 6so6657284qwd.30 for <6806@debbugs.gnu.org>; Sun, 08 Aug 2010 17:14:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.78.194 with SMTP id m2mr7775856qak.19.1281312852624; Sun, 08 Aug 2010 17:14:12 -0700 (PDT) Received: by 10.229.13.97 with HTTP; Sun, 8 Aug 2010 17:14:12 -0700 (PDT) In-Reply-To: <87ocdcvnx6.fsf@stupidchicken.com> References: <87ocdcvnx6.fsf@stupidchicken.com> Date: Sun, 8 Aug 2010 17:14:12 -0700 Message-ID: From: Nathan Weizenbaum Content-Type: multipart/alternative; boundary=00c09f986a126d47fb048d58e52a X-System-Of-Record: true X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Sun, 08 Aug 2010 20:30:26 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.8 (----) --00c09f986a126d47fb048d58e52a Content-Type: text/plain; charset=ISO-8859-1 Open a new Javascript file. Type "/*". Run M-x comment-indent-new-line. This inserts "\n /*", which is incorrect. Now that I try to reproduce my fix, though, it doesn't seem to work. I'm not sure what the proper solution is. On Sun, Aug 8, 2010 at 1:40 PM, Chong Yidong wrote: > Nathan Weizenbaum writes: > > > js-mode doesn't set the comment-multi-line variable. This results in > > comment-indent-new-line behaving improperly when used in a multi-line > comment, > > which also affects auto-fill-mode, according to the documentation for > > comment-multi-line. > > > > Attached is a patch that sets the variable. > > Could you provide a precise recipe for the problem? > --00c09f986a126d47fb048d58e52a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Open a new Javascript file. Type "/*". Run M-x comment-indent-new= -line. This inserts "\n =A0/*", which is incorrect.

--00c09f986a126d47fb048d58e52a-- From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: Set comment-multi-line in js-mode Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Aug 2010 15:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Nathan Weizenbaum Cc: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.128136779430199 (code B ref 6806); Mon, 09 Aug 2010 15:30:04 +0000 Received: (at 6806) by debbugs.gnu.org; 9 Aug 2010 15:29:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiUIT-0007r1-EE for submit@debbugs.gnu.org; Mon, 09 Aug 2010 11:29:53 -0400 Received: from impaqm4.telefonica.net ([213.4.138.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiUIQ-0007qX-MB for 6806@debbugs.gnu.org; Mon, 09 Aug 2010 11:29:51 -0400 Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm4.telefonica.net with bizsmtp id sDww1e00F0r0BT63QFWXMp; Mon, 09 Aug 2010 17:30:31 +0200 Received: from ceviche.home ([83.40.4.203]) by IMPmailhost2.adm.correo with BIZ IMP id sFWX1e0014NokFF1iFWXbx; Mon, 09 Aug 2010 17:30:31 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id BA50066138; Mon, 9 Aug 2010 17:30:30 +0200 (CEST) From: Stefan Monnier In-Reply-To: (Nathan Weizenbaum's message of "Thu, 5 Aug 2010 11:36:41 -0700") Date: Mon, 09 Aug 2010 13:33:23 +0200 Message-ID: References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.8 (-) > js-mode doesn't set the comment-multi-line variable. This results in > comment-indent-new-line behaving improperly when used in a multi-line > comment, which also affects auto-fill-mode, according to the documentation > for comment-multi-line. If I understand and remember correctly, this is not the right fix for your problem: setting comment-multi-line to t will fix your problem with "/*..*/" but will introduce another for "//....\n" and vice-versa. Stefan From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: Set comment-multi-line in js-mode Resent-From: Nathan Weizenbaum Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Aug 2010 20:02:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.12813840755904 (code B ref 6806); Mon, 09 Aug 2010 20:02:04 +0000 Received: (at 6806) by debbugs.gnu.org; 9 Aug 2010 20:01:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiYX5-0001X8-0O for submit@debbugs.gnu.org; Mon, 09 Aug 2010 16:01:15 -0400 Received: from smtp-out.google.com ([74.125.121.35]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiWa9-0000WL-Vs for 6806@debbugs.gnu.org; Mon, 09 Aug 2010 13:56:19 -0400 Received: from kpbe12.cbf.corp.google.com (kpbe12.cbf.corp.google.com [172.25.105.76]) by smtp-out.google.com with ESMTP id o79Huw2J012352 for <6806@debbugs.gnu.org>; Mon, 9 Aug 2010 10:56:59 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1281376619; bh=DDIZ8C2p00Kwn+/ZPONjVJIC+CA=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=Eqy2+4nG62liZSB2wf1UjX5GjuO4XwVuQmMO1JBTSV11CtohucbbKAimiztncCQz6 TDxjIlPViLXopHqDFFTTA== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:x-system-of-record; b=evo325Ivda48Gp1NeBgnfEancS6fiw0Jld4cXXCnvRhkDtOgJSccwdRu3nKEqADsK LS6fLvOiNjBwTgLE+Kuyw== Received: from qwc9 (qwc9.prod.google.com [10.241.193.137]) by kpbe12.cbf.corp.google.com with ESMTP id o79HuQfj026503 for <6806@debbugs.gnu.org>; Mon, 9 Aug 2010 10:56:57 -0700 Received: by qwc9 with SMTP id 9so174567qwc.3 for <6806@debbugs.gnu.org>; Mon, 09 Aug 2010 10:56:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.240.4 with SMTP id ky4mr7528917qcb.104.1281376617063; Mon, 09 Aug 2010 10:56:57 -0700 (PDT) Received: by 10.229.13.97 with HTTP; Mon, 9 Aug 2010 10:56:56 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Aug 2010 10:56:56 -0700 Message-ID: From: Nathan Weizenbaum Content-Type: multipart/alternative; boundary=0016363b8b6c1565ac048d67be5a X-System-Of-Record: true X-Spam-Score: -5.3 (-----) X-Mailman-Approved-At: Mon, 09 Aug 2010 16:01:09 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) --0016363b8b6c1565ac048d67be5a Content-Type: text/plain; charset=ISO-8859-1 My fix doesn't actually fix the "/* */" issue, unfortunately. However, it doesn't break "//" either; note that comment-multi-line is t for e.g. c-mode, and comment-indent-new-line works for "//" there. On Mon, Aug 9, 2010 at 4:33 AM, Stefan Monnier wrote: > > js-mode doesn't set the comment-multi-line variable. This results in > > comment-indent-new-line behaving improperly when used in a multi-line > > comment, which also affects auto-fill-mode, according to the > documentation > > for comment-multi-line. > > If I understand and remember correctly, this is not the right fix for > your problem: setting comment-multi-line to t will fix your problem with > "/*..*/" but will introduce another for "//....\n" and vice-versa. > > > Stefan > --0016363b8b6c1565ac048d67be5a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable My fix doesn't actually fix the "/* */" issue, unfortunately.= However, it doesn't break "//" either; note that comment-mul= ti-line is t for e.g. c-mode, and comment-indent-new-line works for "/= /" there.

On Mon, Aug 9, 2010 at 4:33 AM, Stefan Monni= er <monnie= r@iro.umontreal.ca> wrote:
> js-mode doesn't set the comment-multi-line varia= ble. This results in
> comment-indent-new-line behaving improperly when used in a multi-line<= br> > comment, which also affects auto-fill-mode, according to the documenta= tion
> for comment-multi-line.

If I understand and remember correctly, this is not the right fix for=
your problem: setting comment-multi-line to t will fix your problem with "/*..*/" but will introduce another for "//....\n" and = vice-versa.


=A0 =A0 =A0 =A0Stefan

--0016363b8b6c1565ac048d67be5a-- From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: Set comment-multi-line in js-mode Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Sep 2010 13:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Nathan Weizenbaum Cc: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.12842131669534 (code B ref 6806); Sat, 11 Sep 2010 13:53:02 +0000 Received: (at 6806) by debbugs.gnu.org; 11 Sep 2010 13:52:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuQVZ-0002Ti-Vt for submit@debbugs.gnu.org; Sat, 11 Sep 2010 09:52:46 -0400 Received: from impaqm3.telefonica.net ([213.4.138.3]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuQVX-0002TS-Sz for 6806@debbugs.gnu.org; Sat, 11 Sep 2010 09:52:44 -0400 Received: from IMPmailhost4.adm.correo ([10.20.102.125]) by IMPaqm3.telefonica.net with bizsmtp id 5Qel1f0022iL0W23PRufnV; Sat, 11 Sep 2010 15:54:39 +0200 Received: from ceviche.home ([83.61.39.212]) by IMPmailhost4.adm.correo with BIZ IMP id 5Rud1f0094aeRwb1kRuen5; Sat, 11 Sep 2010 15:54:39 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id 96D56660D2; Sat, 11 Sep 2010 15:54:37 +0200 (CEST) From: Stefan Monnier Message-ID: References: Date: Sat, 11 Sep 2010 15:54:37 +0200 In-Reply-To: (Nathan Weizenbaum's message of "Mon, 9 Aug 2010 10:56:56 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > My fix doesn't actually fix the "/* */" issue, unfortunately. However, it > doesn't break "//" either; note that comment-multi-line is t for e.g. > c-mode, and comment-indent-new-line works for "//" there. Indeed, I misremembered. Feel free to install this patch. Stefan > On Mon, Aug 9, 2010 at 4:33 AM, Stefan Monnier wrote: >> > js-mode doesn't set the comment-multi-line variable. This results in >> > comment-indent-new-line behaving improperly when used in a multi-line >> > comment, which also affects auto-fill-mode, according to the >> documentation >> > for comment-multi-line. >> >> If I understand and remember correctly, this is not the right fix for >> your problem: setting comment-multi-line to t will fix your problem with >> "/*..*/" but will introduce another for "//....\n" and vice-versa. >> >> >> Stefan >> From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: Set comment-multi-line in js-mode Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Sep 2010 18:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Nathan Weizenbaum , 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.12856972959504 (code B ref 6806); Tue, 28 Sep 2010 18:09:02 +0000 Received: (at 6806) by debbugs.gnu.org; 28 Sep 2010 18:08:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0eb8-0002TF-6k for submit@debbugs.gnu.org; Tue, 28 Sep 2010 14:08:14 -0400 Received: from pantheon-po24.its.yale.edu ([130.132.50.118]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0eb5-0002T7-Sg for 6806@debbugs.gnu.org; Tue, 28 Sep 2010 14:08:13 -0400 Received: from furry (dhcp128036014154.central.yale.edu [128.36.14.154]) (authenticated bits=0) by pantheon-po24.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o8SIB2VO019746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 28 Sep 2010 14:11:02 -0400 Received: by furry (Postfix, from userid 1000) id 76E6FC018; Tue, 28 Sep 2010 14:11:02 -0400 (EDT) From: Chong Yidong References: Date: Tue, 28 Sep 2010 14:11:02 -0400 In-Reply-To: (Stefan Monnier's message of "Sat, 11 Sep 2010 15:54:37 +0200") Message-ID: <8762xpyc09.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Stefan Monnier writes: >> My fix doesn't actually fix the "/* */" issue, unfortunately. However, it >> doesn't break "//" either; note that comment-multi-line is t for e.g. >> c-mode, and comment-indent-new-line works for "//" there. > > Indeed, I misremembered. Feel free to install this patch. The patch doesn't do the right thing. The reported problem is that if you enter "/*" in a js-mode buffer and do M-x comment-indent-new-line, Emacs inserts another "/*". This problem is not limited to js-mode. It afflicts C++ also. Try this: C-x C-f foo.cc RET /* M-x comment-indent-new-line RET Emacs inserts another /*. The reason is this stretch of code in newcomment.el:1311: (normalp (string-match (regexp-quote (comment-string-strip comment-start t t)) comstart)) (comment-end (if normalp comment-end ;; The comment starter is not the normal comment-start ;; so we can't just use comment-end. (save-excursion (goto-char compos) (if (not (comment-forward)) comment-end (comment-string-strip (buffer-substring (save-excursion (comment-enter-backward) (point)) (point)) nil t))))) When the default comment-start is "//" but the current comment begins in "/*", this code tries to find the appropriate comment-end by doing comment-forward. But if the comment-end "*/" is not already present in the buffer, it fails. Any suggestion? From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: another reason for the patch References: In-Reply-To: Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jan 2017 04:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.148471540116474 (code B ref 6806); Wed, 18 Jan 2017 04:57:01 +0000 Received: (at 6806) by debbugs.gnu.org; 18 Jan 2017 04:56:41 +0000 Received: from localhost ([127.0.0.1]:34254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTiIb-0004He-CE for submit@debbugs.gnu.org; Tue, 17 Jan 2017 23:56:41 -0500 Received: from gproxy6-pub.mail.unifiedlayer.com ([67.222.39.168]:41083) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTiIZ-0004HO-5F for 6806@debbugs.gnu.org; Tue, 17 Jan 2017 23:56:39 -0500 Received: (qmail 4232 invoked by uid 0); 18 Jan 2017 04:56:24 -0000 Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy6.mail.unifiedlayer.com with SMTP; 18 Jan 2017 04:56:24 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id ZgwK1u00K2f2jeq01gwNlw; Tue, 17 Jan 2017 21:56:24 -0700 X-Authority-Analysis: v=2.1 cv=JsBi8qIC 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=mDV3o1hIAAAA:8 a=ef2z-JSiy3HnivcjHRMA:9 a=zstS-IiYAAAA:8 a=GdCdrrut13jPOpArN2cA:9 a=_FVE-zBwftR9WsbkzFJk:22 a=4G6NA9xxw8l3yy4pmD5M:22 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:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=nsMuxiaAzlkSn7F4mvjxcJCkRt3qG8gf3w5te13gnMY=; b=Ui0dWKeaATciplC4sj/uFgQ2Sm k+3RsxeEQfcdV6yLAX2jAZjCEsx5mkOMv3mEaEs3OYFdFjIIpnAfhoEFzjNyGMXzf4MOvHxtuAyd/ XgVbZjbbKM2lSv5V8gFif0tx3; Received: from 174-16-146-181.hlrn.qwest.net ([174.16.146.181]:35972 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1cTiIF-0005Zi-LC; Tue, 17 Jan 2017 21:56:19 -0700 From: Tom Tromey X-Attribution: Tom Date: Tue, 17 Jan 2017 21:56:18 -0700 Message-ID: <874m0xhsp9.fsf@tromey.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: 1cTiIF-0005Zi-LC X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-146-181.hlrn.qwest.net (bapiya) [174.16.146.181]:35972 X-Source-Auth: tom+tromey.com X-Email-Count: 9 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) --=-=-= Content-Type: text/plain Hi. I'd like to resurrect this bug. While working in JS I found a bug, which I tracked down to the same change indicated here. Basically, auto-fill in JS mode will sometimes insert a "/*" on a filled line, where it should not. You can see a precise recipe in the new test case, in the attached patch. One funny thing is that if you do this interactively (in my real-world case I had auto-fill-mode enabled), you have to be sure that there isn't a newline after point. If there is a newline, the filling works properly. Anyway, let me know what you think. I'd like to check this in, but, given the comments in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6806#23 I suppose I would not close the bug. Tom --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=P Content-Description: the patch commit 5a615aeae34a257a1879134a883c61bc42f41691 Author: Tom Tromey Date: Tue Jan 17 21:50:14 2017 -0700 Set comment-multi-line in js-mode Bug#6806: * lisp/progmodes/js.el (js-mode): Set comment-multi-line to t. * test/lisp/progmodes/js-tests.el (js-mode-auto-fill): New test. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 2e5c6ae..cfd58d2 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3852,6 +3852,7 @@ js-mode comment-start-skip "\\(//+\\|/\\*+\\)\\s *") (setq-local comment-line-break-function #'c-indent-new-comment-line) (setq-local c-block-comment-start-regexp "/\\*") + (setq-local comment-multi-line t) (setq-local electric-indent-chars (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*". diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el index 84749ef..7cb737c 100644 --- a/test/lisp/progmodes/js-tests.el +++ b/test/lisp/progmodes/js-tests.el @@ -85,6 +85,20 @@ (should (= (current-column) x)) (forward-line)))) +(ert-deftest js-mode-auto-fill () + (with-temp-buffer + (js-mode) + (setq fill-column 70) + (insert "/* ") + (dotimes (_ 16) + (insert "test ")) + (do-auto-fill) + ;; The bug is that, after auto-fill, the second line starts with + ;; "/*", whereas it should start with " * ". + (goto-char (point-min)) + (forward-line) + (should (looking-at " \\* test")))) + (provide 'js-tests) ;;; js-tests.el ends here --=-=-=-- From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: checked in the patch References: In-Reply-To: Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Feb 2017 20:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.148624016928082 (code B ref 6806); Sat, 04 Feb 2017 20:30:03 +0000 Received: (at 6806) by debbugs.gnu.org; 4 Feb 2017 20:29:29 +0000 Received: from localhost ([127.0.0.1]:56323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ca6xd-0007Is-JA for submit@debbugs.gnu.org; Sat, 04 Feb 2017 15:29:29 -0500 Received: from gproxy9-pub.mail.unifiedlayer.com ([69.89.20.122]:42251 helo=gproxy9.mail.unifiedlayer.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ca6xb-0007If-HW for 6806@debbugs.gnu.org; Sat, 04 Feb 2017 15:29:28 -0500 Received: from cmgw2 (unknown [10.0.90.83]) by gproxy9.mail.unifiedlayer.com (Postfix) with ESMTP id 8EB541E097A for <6806@debbugs.gnu.org>; Sat, 4 Feb 2017 13:29:20 -0700 (MST) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw2 with id gkVF1u00H2f2jeq01kVJLN; Sat, 04 Feb 2017 13:29:20 -0700 X-Authority-Analysis: v=2.1 cv=H5NInYoi 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=n2v9WMKugxEA:10 a=fBqZxQAZCsFh7XLYJZ8A:9 a=_Qnt5pzU-DEA:10 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:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=oUb6uGCGWXaaOabJlKXSO0Yq6ZqMVqRjavVB7A0o1w8=; b=QSV2LYNM1DOFoTyiGm07ZjtA4o ysvsA1EquwE8XrVOUMcZeQOkHX5WGYGaRkJtTqeJ98Z2DxguAvMgeZ2xWrX7V+vLolA5i5OCNkn5H M5+LUpkk7iaLqJ6BWw7eRRpIF; Received: from 174-16-146-181.hlrn.qwest.net ([174.16.146.181]:54180 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1ca6xO-0003r0-Oe; Sat, 04 Feb 2017 13:29:15 -0700 From: Tom Tromey X-Attribution: Tom Date: Sat, 04 Feb 2017 13:29:11 -0700 Message-ID: <877f55aeeg.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain 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: 1ca6xO-0003r0-Oe X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-146-181.hlrn.qwest.net (bapiya) [174.16.146.181]:54180 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) I went ahead and checked in the patch, mostly because comment #20 said it was fine, and also because it fixed a bug. I think this bug should be left open, though, due to the other issues identified. Tom From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: another reason for the patch Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Feb 2017 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tom Tromey Cc: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.148624323932458 (code B ref 6806); Sat, 04 Feb 2017 21:21:02 +0000 Received: (at 6806) by debbugs.gnu.org; 4 Feb 2017 21:20:39 +0000 Received: from localhost ([127.0.0.1]:56339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ca7l9-0008RS-7f for submit@debbugs.gnu.org; Sat, 04 Feb 2017 16:20:39 -0500 Received: from mail-io0-f178.google.com ([209.85.223.178]:33630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ca7l8-0008RF-0k for 6806@debbugs.gnu.org; Sat, 04 Feb 2017 16:20:38 -0500 Received: by mail-io0-f178.google.com with SMTP id v96so42053030ioi.0 for <6806@debbugs.gnu.org>; Sat, 04 Feb 2017 13:20:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=GqUA9AczWRrFHQIt4YkSkX7uLVwoGeCn7ALQS2JaZKo=; b=prdQXrMYSybgmHuwTHG/sc5JzfVnD0UP/3KQUfHEE57mtUpAjfdy4Q8vHtUSKP8nRD LZQ2cj761FVBLmd1nvZtYWqRFjcbXRsTOQFQwrJr38Ym3C5MJrSEnwshggnDRLpDD4kF T5V19NNhjRLUZ1J1JlZcWBm9i42W+h5quQzlgYIq6m/RoLtuZAT6r83C9K2wsp1H1ZzE 1FE9CMxf4gUHFsgxPwsSMjHDhYalhRE5SHDbTaPMZ5ELfl6NYzRFsvllwoX2QGgZGWI5 CoJQMGI0TKgJBqLqxiAqLs2Di8yczAW5fiYk378DHl8tcJiKM6Gbx+KJlBIm7ZqNxjPL cm9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=GqUA9AczWRrFHQIt4YkSkX7uLVwoGeCn7ALQS2JaZKo=; b=DxyYDuqHJ4XPkoLm55wiC5gDx1OHsB9us2Tcuhr40HmWq/b86cwcyM/m+bLarteS84 IJj+eq9XI7xtiSRr0zAZnCeiEufGZYfFa0XJv+TEAcmiozjxmZ8wEWgodNseKMUlErwK Vlw/VNnT+cP1XJOqJ2RnNqEbSPGtCHLMvKWSwaP+okei/VF+7lZju3A6YtxogmMW+KqL tt2U3Un2hMuQ8utYL/UFK9dtA/D1ek4gz4r+tExSba4NvhV+lt3jkSP9qrGMmy9ks+R0 cZSCQlTkgFAR7PGKDQr3+PuFdt46Fd/V4wFAC48KLUNUILOmFurXSWwpJ/15uu+0k3KC fpaQ== X-Gm-Message-State: AMke39mPe6Tk1i4WIcfgdj9t8SdsL/iJSRISbJvuVz1ZZvWA7qMwr8gGOR5DKvFF1mv4Fw== X-Received: by 10.107.159.14 with SMTP id i14mr2146312ioe.143.1486243232497; Sat, 04 Feb 2017 13:20:32 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id u63sm4994490ioi.4.2017.02.04.13.20.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Feb 2017 13:20:31 -0800 (PST) From: npostavs@users.sourceforge.net References: <874m0xhsp9.fsf@tromey.com> Date: Sat, 04 Feb 2017 16:21:41 -0500 In-Reply-To: <874m0xhsp9.fsf@tromey.com> (Tom Tromey's message of "Tue, 17 Jan 2017 21:56:18 -0700") Message-ID: <871svdps7u.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Tom Tromey writes: > Hi. I'd like to resurrect this bug. > > While working in JS I found a bug, which I tracked down to the same > change indicated here. Basically, auto-fill in JS mode will sometimes > insert a "/*" on a filled line, where it should not. > > You can see a precise recipe in the new test case, in the attached > patch. > > One funny thing is that if you do this interactively (in my real-world > case I had auto-fill-mode enabled), you have to be sure that there isn't > a newline after point. If there is a newline, the filling works > properly. > > Anyway, let me know what you think. I'd like to check this in, but, > given the comments in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6806#23 > I suppose I would not close the bug. Sorry I missed this before you pushed the patch, but I'm not sure this is a bug. If I revert the setting of `comment-multi-line' then with your test scenario, the result of auto fill is /* test test test test test test test test test test test test test */ /* test test test So the opened comment was correctly terminated, and a new one started, just as documented. Perhaps you don't like that `comment-multi-line' is nil by default, but it doesn't look like a bug to me. From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: another reason for the patch Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Feb 2017 21:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tom Tromey Cc: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.14862439841155 (code B ref 6806); Sat, 04 Feb 2017 21:34:01 +0000 Received: (at 6806) by debbugs.gnu.org; 4 Feb 2017 21:33:04 +0000 Received: from localhost ([127.0.0.1]:56345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ca7xA-0000IV-Ke for submit@debbugs.gnu.org; Sat, 04 Feb 2017 16:33:04 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:34419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ca7x8-0000Hv-9G; Sat, 04 Feb 2017 16:33:02 -0500 Received: by mail-it0-f67.google.com with SMTP id o185so4819549itb.1; Sat, 04 Feb 2017 13:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=DmC5lPXUetQVIAQ5f92fe32AEjaMw3+BPSScQnb7DTY=; b=DyGrN+WRIkTJZe2lfcPW35OLdNahSKS7qysqWBDDhjUcjnaODbjDFjoIdjMTQiuEYn qf2oQi+lfx6FBTJR9OIVM8obCc4LZIaQbe/Lz67Fw771KoMA7zR6SI8ZZapihiV6vRBr rMppdexcCH5YaXt6gK6A1teSlsb/4JsZbBX2hvPlLmQp/z4iJf9o8af8t8H3INIBvq6a 2DC75m2qBUbV+o3PSdzMru4lxyVUt8OUunBxR3GcWW8vGZL3NeOD4cGlq/jffnI+4fU4 INt3InizOnnCXaJuk4E8TLx+o3kkzOel3scVtIlMHMV6ggs+rkxWw9Zr8rEdJXpqHo7v pALw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=DmC5lPXUetQVIAQ5f92fe32AEjaMw3+BPSScQnb7DTY=; b=BaKiwZR9lfqi8MHpmJbDWSl2shFetPI/lCSY2YOapoiRYMd1x9s/KreVdhkdxyg1wk M1J/mza354Z8xCL4/yAHqlCNRk0IGea89srOivTRBRESW7U90MtIJiEzv1S0WkZdbp1A Imv80iyzkmZGBUEP0ofFO8dz1nvn8V3NcHGU8Q//derqcBiFpqiiz22jyb+VBAF+qqeO zaKHvUUIAM2/Y/4TW5zwr/qeFfE3Z9EpEyRBSoY7S+X713R35/tYkdqNDZfz+d1sR/N8 npK0BTv+KLvwpjR0FjIOi8rc7eHUh7Hml0GyunDyoX3U9d+uEr2mt4NhCwl2QZAvCOtT T8yQ== X-Gm-Message-State: AIkVDXIqj4l3IHQ04pd2cryWGe1Civ6Kt8dSMcEhx5wLmAh1qa74Wy7+S1eWRmZPluluiw== X-Received: by 10.36.48.23 with SMTP id q23mr2434882itq.6.1486243976813; Sat, 04 Feb 2017 13:32:56 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 62sm1810051itl.1.2017.02.04.13.32.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Feb 2017 13:32:56 -0800 (PST) From: npostavs@users.sourceforge.net References: <874m0xhsp9.fsf@tromey.com> <871svdps7u.fsf@users.sourceforge.net> Date: Sat, 04 Feb 2017 16:34:06 -0500 In-Reply-To: <871svdps7u.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sat, 04 Feb 2017 16:21:41 -0500") Message-ID: <87y3xlod2p.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) found 6806 24.5 fixed 6806 25.1 quit npostavs@users.sourceforge.net writes: > > If I revert the setting of `comment-multi-line' then with > your test scenario, the result of auto fill is > > /* test test test test test test test test test test test test test */ > /* test test test Up until 24.5 the result is /* test test test test test test test test test test test test test /* test test test So this bug has been fixed in 25.1. From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: another reason for the patch Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Feb 2017 15:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: npostavs@users.sourceforge.net Cc: 6806@debbugs.gnu.org, Tom Tromey Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.148682636018135 (code B ref 6806); Sat, 11 Feb 2017 15:20:01 +0000 Received: (at 6806) by debbugs.gnu.org; 11 Feb 2017 15:19:20 +0000 Received: from localhost ([127.0.0.1]:35826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccZSK-0004iR-E3 for submit@debbugs.gnu.org; Sat, 11 Feb 2017 10:19:20 -0500 Received: from gproxy8-pub.mail.unifiedlayer.com ([67.222.33.93]:55989) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ccZSI-0004iE-Fb for 6806@debbugs.gnu.org; Sat, 11 Feb 2017 10:19:18 -0500 Received: (qmail 5067 invoked by uid 0); 11 Feb 2017 15:19:08 -0000 Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy8.mail.unifiedlayer.com with SMTP; 11 Feb 2017 15:19:08 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw2 with id jTK51u00F2f2jeq01TK8s2; Sat, 11 Feb 2017 08:19:08 -0700 X-Authority-Analysis: v=2.1 cv=H5NInYoi 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=n2v9WMKugxEA:10 a=bWqkAhRuEk7XOkfEfSkA: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:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=EP62xjwyV32nlxv5yE6Oj8wULiUWnBJdJcQPQctyb4Q=; b=IODTiihBASkELKazmtIZgt7hho Brl3zlC7skyj5D116uqkQXX8M8SuIZyzgE3rdTuXh0unFJmo6sHVlCfWM/+u0oP+c0WHz+MSnIF/F oVjzwJ9q9AOqqQ5XgmqlPCGUv; Received: from 75-171-188-196.hlrn.qwest.net ([75.171.188.196]:49930 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1ccZS5-0001JS-EJ; Sat, 11 Feb 2017 08:19:05 -0700 From: Tom Tromey References: <874m0xhsp9.fsf@tromey.com> <871svdps7u.fsf@users.sourceforge.net> X-Attribution: Tom Date: Sat, 11 Feb 2017 08:19:04 -0700 In-Reply-To: <871svdps7u.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sat, 04 Feb 2017 16:21:41 -0500") Message-ID: <87a89s69hz.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 75.171.188.196 X-Exim-ID: 1ccZS5-0001JS-EJ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-171-188-196.hlrn.qwest.net (bapiya) [75.171.188.196]:49930 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Noam> So the opened comment was correctly terminated, and a new one started, Noam> just as documented. Perhaps you don't like that `comment-multi-line' is Noam> nil by default, but it doesn't look like a bug to me. I'm not sure what to do about this now. Should I revert the patch? If it were solely up to me I would leave the patch in, since I think non-nil comment-multi-line is more normal in JS code. And, if the patch is reverted then I think comment-multi-line needs a :safe setting so it can by set in .dir-locals.el. Tom From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: another reason for the patch Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Feb 2017 04:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tom Tromey Cc: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.14868732001876 (code B ref 6806); Sun, 12 Feb 2017 04:20:02 +0000 Received: (at 6806) by debbugs.gnu.org; 12 Feb 2017 04:20:00 +0000 Received: from localhost ([127.0.0.1]:36114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccldn-0000UB-UT for submit@debbugs.gnu.org; Sat, 11 Feb 2017 23:20:00 -0500 Received: from mail-it0-f48.google.com ([209.85.214.48]:35779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccldm-0000Tz-5x for 6806@debbugs.gnu.org; Sat, 11 Feb 2017 23:19:58 -0500 Received: by mail-it0-f48.google.com with SMTP id 203so161686435ith.0 for <6806@debbugs.gnu.org>; Sat, 11 Feb 2017 20:19:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=HECHBqqE1gZQaEtb1I0alolVjvZkA9u2FugKZ8AVN+8=; b=Fm+gNuKJ6YZWGMm8Trod623kNt5JAg6FybId3VejOPMLeToPyZ9dMNjerKYTwfvAUz 7NGO+yNOPgjLaDjqCWY8y7iTcPQYL1DFdJhChMdJII4X73I33clG5vM5OT1sn9+U5OgI Qf1PZiElEqlaAWiS8nAzMrCrIUvzZoxseoL1BWw0kelHsMI/RmRjWvPRfk5Bd5w5tCwP bgXxXOcct4sUKPuTqZ9/FDmSNueRpIJ/9HEj4oZdyFgq+cVbY52efHQaaDtEzKyAJQ6V jlggjHFLxWM7wtUFGL6TZh0czkAUNtREDjwzqOI0wMfu4vFQ+rkJLuZHeLlC5Q2N2YM+ 0zKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=HECHBqqE1gZQaEtb1I0alolVjvZkA9u2FugKZ8AVN+8=; b=TL/2JJ/lMarV8ynSai/SDx2yuBkBd/yfqr1HuiQJlRD3MeQf97EYnidX8i2XrVxehw SmYMd8c5kPx2fFbgsz9l4drKXA5kfjUxfcFzZ5ReL+dwFZP9fw70zBejkGjyVViHQx+B VDEspbVu0h+AHv01leT15GJhFfOS6AdAgQfVOp1xWxZHbDMgEKt58jevmRzI0RFs01QG LVsaFi2AiKjq6VQ0knWlxW1Ao6Y36iSsMkYZ1q/8KBOxkwSiqpRB9ke9kpo3C7wCoAbV YXRem8YGiaTEBb7chHQ6nPXW1vaobkO7OK3Hp2A65V/TJYKW1JO/bQ7k895ubSgZSNWA OsOQ== X-Gm-Message-State: AIkVDXIhP/zLrwYw0Y6dk88gtzrQs98hO+PzDiHBOq/uJBNr5p8OKVXAsQfjGpM5L6sWMw== X-Received: by 10.36.194.67 with SMTP id i64mr36543596itg.68.1486873192515; Sat, 11 Feb 2017 20:19:52 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id j14sm283761itd.0.2017.02.11.20.19.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Feb 2017 20:19:51 -0800 (PST) From: npostavs@users.sourceforge.net References: <874m0xhsp9.fsf@tromey.com> <871svdps7u.fsf@users.sourceforge.net> <87a89s69hz.fsf@tromey.com> Date: Sat, 11 Feb 2017 23:21:02 -0500 In-Reply-To: <87a89s69hz.fsf@tromey.com> (Tom Tromey's message of "Sat, 11 Feb 2017 08:19:04 -0700") Message-ID: <87o9y8kpjl.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --=-=-= Content-Type: text/plain Tom Tromey writes: > Noam> So the opened comment was correctly terminated, and a new one started, > Noam> just as documented. Perhaps you don't like that `comment-multi-line' is > Noam> nil by default, but it doesn't look like a bug to me. > > I'm not sure what to do about this now. > Should I revert the patch? > > If it were solely up to me I would leave the patch in, since I think > non-nil comment-multi-line is more normal in JS code. And, if the patch > is reverted then I think comment-multi-line needs a :safe setting so it > can by set in .dir-locals.el. I don't really have much of an opinion regarding the best value for comment-multi-line. But we should test that filling works correctly regardless of its value, and we should add a :safe setting anyway. Here is a patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Test-comment-multi-line-nil-auto-fill-case-too.patch Content-Description: patch >From cbf522f2446035bcd34a676c2ef3e641b4f20f90 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 11 Feb 2017 23:15:13 -0500 Subject: [PATCH] Test comment-multi-line = nil auto fill case too * test/lisp/progmodes/js-tests.el (js-mode-auto-fill): Test with `comment-multi-line' both nil and non-nil. * lisp/newcomment.el (comment-multi-line): Mark safe if it's a boolean. --- lisp/newcomment.el | 1 + test/lisp/progmodes/js-tests.el | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 1af89293b6..4b261c34c6 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -309,6 +309,7 @@ comment-multi-line It also affects \\[indent-new-comment-line]. However, if you want this behavior for explicit filling, you might as well use \\[newline-and-indent]." :type 'boolean + :safe #'booleanp :group 'comment) (defcustom comment-empty-lines nil diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el index d61f084e0d..99f5898525 100644 --- a/test/lisp/progmodes/js-tests.el +++ b/test/lisp/progmodes/js-tests.el @@ -89,16 +89,18 @@ (ert-deftest js-mode-auto-fill () (with-temp-buffer (js-mode) - (setq fill-column 70) - (insert "/* ") - (dotimes (_ 16) - (insert "test ")) - (do-auto-fill) - ;; The bug is that, after auto-fill, the second line starts with - ;; "/*", whereas it should start with " * ". - (goto-char (point-min)) - (forward-line) - (should (looking-at " \\* test")))) + (let ((fill-column 10) + (comment-multi-line t)) + (insert "/* test test") + (do-auto-fill) + ;; Filling should continue the multi line comment. + (should (equal (buffer-string) "/* test\n * test")) + (erase-buffer) + (insert "/* test test") + (setq comment-multi-line nil) + (do-auto-fill) + ;; Filling should start a new comment on the next line. + (should (equal (buffer-string) "/* test */\n/* test"))))) (ert-deftest js-mode-regexp-syntax-bug-25529 () (dolist (regexp-contents '("[^[]" -- 2.11.1 --=-=-= Content-Type: text/plain Perhaps we should also revert the js-mode comment-multi-line setting, not sure. --- i/lisp/progmodes/js.el +++ w/lisp/progmodes/js.el @@ -3856,7 +3856,6 @@ js-mode comment-start-skip "\\(//+\\|/\\*+\\)\\s *") (setq-local comment-line-break-function #'c-indent-new-comment-line) (setq-local c-block-comment-start-regexp "/\\*") - (setq-local comment-multi-line t) (setq-local electric-indent-chars (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*". --=-=-=-- From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: another reason for the patch Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Feb 2017 06:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: npostavs@users.sourceforge.net Cc: 6806@debbugs.gnu.org, Tom Tromey Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.148688020312114 (code B ref 6806); Sun, 12 Feb 2017 06:17:01 +0000 Received: (at 6806) by debbugs.gnu.org; 12 Feb 2017 06:16:43 +0000 Received: from localhost ([127.0.0.1]:36124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccnSl-00039J-0A for submit@debbugs.gnu.org; Sun, 12 Feb 2017 01:16:43 -0500 Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]:52035) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ccnSi-000393-6P for 6806@debbugs.gnu.org; Sun, 12 Feb 2017 01:16:40 -0500 Received: (qmail 8431 invoked by uid 0); 12 Feb 2017 06:16:29 -0000 Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy4.mail.unifiedlayer.com with SMTP; 12 Feb 2017 06:16:29 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id jiGM1u0012f2jeq01iGQfG; Sat, 11 Feb 2017 23:16:29 -0700 X-Authority-Analysis: v=2.1 cv=U+QBU4bu 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=n2v9WMKugxEA:10 a=FP58Ms26AAAA:8 a=RMmzcTr6sed5b3IJ5YsA:9 a=6LVbBl2NLSWPyIBDCKCu:22 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:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LMMsgqdXqr7tGYo6hFj/pUKR1OIokps2PWtSGBWeEOg=; b=TcOXVSNHX767cNTT17Fn6Xb9I7 9o+EVa/bhXtmRyWikGDNR4RSvvwbeFlINBlGFXql3GJc3ujjC3bOxGc5WF6kVQJT9b/6G/qVAGKIZ zUk7KL5fBSDENxcYmmu8o1+ed; Received: from 174-16-128-54.hlrn.qwest.net ([174.16.128.54]:54130 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1ccnSO-0002mF-Qd; Sat, 11 Feb 2017 23:16:20 -0700 From: Tom Tromey References: <874m0xhsp9.fsf@tromey.com> <871svdps7u.fsf@users.sourceforge.net> <87a89s69hz.fsf@tromey.com> <87o9y8kpjl.fsf@users.sourceforge.net> X-Attribution: Tom Date: Sat, 11 Feb 2017 23:16:19 -0700 In-Reply-To: <87o9y8kpjl.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sat, 11 Feb 2017 23:21:02 -0500") Message-ID: <878tpc2ato.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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.128.54 X-Exim-ID: 1ccnSO-0002mF-Qd X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-128-54.hlrn.qwest.net (bapiya) [174.16.128.54]:54130 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) >>>>> "Noam" == Noam Postavsky writes: Noam> Perhaps we should also revert the js-mode comment-multi-line setting, Noam> not sure. My belief is that more JS code follows the comment-multi-line style than follows the other style. Tom From unknown Mon Aug 11 18:18:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6806: another reason for the patch Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Feb 2017 04:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tom Tromey Cc: 6806@debbugs.gnu.org Received: via spool by 6806-submit@debbugs.gnu.org id=B6806.148713414916727 (code B ref 6806); Wed, 15 Feb 2017 04:50:01 +0000 Received: (at 6806) by debbugs.gnu.org; 15 Feb 2017 04:49:09 +0000 Received: from localhost ([127.0.0.1]:40418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdrWf-0004Lf-Dr for submit@debbugs.gnu.org; Tue, 14 Feb 2017 23:49:09 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:34125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdrWd-0004LL-KE; Tue, 14 Feb 2017 23:49:07 -0500 Received: by mail-it0-f68.google.com with SMTP id r141so8781253ita.1; Tue, 14 Feb 2017 20:49:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=1dgaxSzPc/MccHSh/TIDTEbK+gOk9/HQvIr1kO2IieQ=; b=Nu5CgWhGbbZB4nFqeGY+CTYYQw8dzugJvfipHZXXnoQSvzLU0fYpPJjkRoO0vfEQB6 P0a+TFD0HC+415spS3ucBjPsYZ0cvwXOTToKgPdmqS3O8/YQlfEdczfpAh3gsvgEOA2/ lF1otRveLuWGT+z8qpAIsAPJc2psd4kC8h0x2hGhYRa6v8oPcX/eR2KxM6FEl9Y1O8uf Sbty63XiJ/JJY3rRPEOFm0Jygnlu+f1aME3Ob+VqC2afKFNTELhN/xgAnPRQ6havch+d uMSkOmsLaXppxuSmSCWwN3+TOD2lP64TJwFoh4hE+Bz3VDi98gmlvipgJZm2s1tCCC7H KUBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=1dgaxSzPc/MccHSh/TIDTEbK+gOk9/HQvIr1kO2IieQ=; b=E9lA5mSe3loMQF7QzMuCYdHr3vw+fyv86Lr6WwgxBv73sgnN9am5IpFvkE2lzxqnKU KefW8ebSZVJwS40hReYH1XS4MAoW3faH8Gzf4h9jgSjWnlXnSOk5vwS+AZwPFUtVyEdg dXqZ1vfXdozvgL9OcJtGIvDPiSRZHYW1EH2910lxT322FgpMjBwfunJBPh507wtthKPs IoC2fM8bEJm2AlDGGzAADWguUi89xPgIfTMY+RiF4udNP4CwXrnyZw/LhEQ/km0mzW0P 475Ee5uwerPjeJU9apd3qW75Dw7K+ZVtmgemuhnP6c4WOf3iPjQhYlmhau6779kffzUN xCUg== X-Gm-Message-State: AMke39lXowhY0GsSIf9CfPwjFJDQth2ZRjSoEfC3a72FZ5ZM87dzmBPlckEmS2zoMM3qvw== X-Received: by 10.36.6.199 with SMTP id 190mr6993803itv.79.1487134141830; Tue, 14 Feb 2017 20:49:01 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id i189sm1301919ita.23.2017.02.14.20.49.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Feb 2017 20:49:01 -0800 (PST) From: npostavs@users.sourceforge.net References: <874m0xhsp9.fsf@tromey.com> <871svdps7u.fsf@users.sourceforge.net> <87a89s69hz.fsf@tromey.com> <87o9y8kpjl.fsf@users.sourceforge.net> <878tpc2ato.fsf@tromey.com> Date: Tue, 14 Feb 2017 23:50:10 -0500 In-Reply-To: <878tpc2ato.fsf@tromey.com> (Tom Tromey's message of "Sat, 11 Feb 2017 23:16:19 -0700") Message-ID: <874lzwkqgt.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) close 6806 quit Tom Tromey writes: >>>>>> "Noam" == Noam Postavsky writes: > > Noam> Perhaps we should also revert the js-mode comment-multi-line setting, > Noam> not sure. > > My belief is that more JS code follows the comment-multi-line style than > follows the other style. Okay, I pushed the patch without changing comment-multi-line back [1: 0a64666288]; I added a mention about the new comment-multi-line setting in NEWS, we'll see if anyone objects. 1: 2017-02-14 22:29:56 -0500 0a64666288e3f32967db4ad683a4bc2f225fb952 Test comment-multi-line = nil auto fill case too