From debbugs-submit-bounces@debbugs.gnu.org Sat May 10 03:34:39 2025 Received: (at submit) by debbugs.gnu.org; 10 May 2025 07:34:39 +0000 Received: from localhost ([127.0.0.1]:43291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uDejG-0006ud-L7 for submit@debbugs.gnu.org; Sat, 10 May 2025 03:34:39 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37926) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uDX0K-00031e-3b for submit@debbugs.gnu.org; Fri, 09 May 2025 19:19:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uDX0D-0002jj-Uk for bug-gnu-emacs@gnu.org; Fri, 09 May 2025 19:19:38 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uDX0B-0001L8-4E for bug-gnu-emacs@gnu.org; Fri, 09 May 2025 19:19:37 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5fbdf6973e7so3275306a12.2 for ; Fri, 09 May 2025 16:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alley.com; s=google; t=1746832771; x=1747437571; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=2sezF/v3lc9z5nL3CQaKZn7lmGs7tBskBf/a1g0eHmw=; b=smFpMK8TuWyZrnLfl1ILxrrVYTsam6iBSFgRruvgoKTRNgAHXHMsbp9s71lFp6eKUm mnefV1A5UCtElYjgXlwkURpFtFbBgw81WdIkqSVsyyGn3yqi6bEFPE10S08hXmUAm/sU VOia5Na/hkHsSkJxl+MSG2IfY3z+SyB0jDmwHKu+pjR52Bc63dPBAuGdiyEkvPdr1bCG XKuN/rvSDaywL1V5dDpR+2DJ29mUtTKt02DI8lSv+C1XrBxfLrNFKBeH39OfzA9QkcQl /7yvxWZUzelcTz7M+TJe/3mb6GcMlAqEu/yz4E3J0Nq2V/0FRYc1+omy2j3y4w6lmbiT G5Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746832771; x=1747437571; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2sezF/v3lc9z5nL3CQaKZn7lmGs7tBskBf/a1g0eHmw=; b=RLN1XwCV0YxxaBwbD4wyuRF9Uz0Y3NKvZYq3E6U8CW7saoHBHuER9NOVy1RxIxTwgp 4/qtSanaZ+hcXjkwtJLEwVs5BxwlkqV/aNjYFdxCFN9aWN0ftcZJXACzGCMahFZlKg+Z rjezOv+vSsFjfLa7AF6PzN7GCFlNC05bwpiT1CSjv0E0a2stAN4yOb/9zvLQIO4FJYAQ jxiFE00FFxKFwP6ez+NW1iZUVH3tQPqHP4HSC2NXj4p8rNaso55uhRc9vPIBP09p8UG9 mMXRBNiqTJOkKK99hfHClVbol2SGI7/C4g8o4jM0lkRpMvptmqyESH3jnkogwsI2T53F 48wQ== X-Gm-Message-State: AOJu0YxqFn9FjRY7aGSpychrjniogbIiKSiaaEBlVgRPL0I0x3cp/3xB vgUZjl5Ig4xpOfX1rJTbyowTHlVvX3l+Rnw+K5g5urljpj7XikMbEOQ6xSrAzqsp1jPKzDfTStd Aw61PFyQKqfAbIu6FcAVT5T8p/sMQ1kY1xO+jNSJw6w8e99ngVDU= X-Gm-Gg: ASbGncuWUIZVWe4dr6ACR1hemSim0ajK2jqVkxPTnYiwJI/Boh2EIAigPJRvIYTruZy rl4zhAjKD6Gg3lpltU4j8gQiHicnMC3THD46sy1xw3Qf/mDhJXOlkov2oKjvcOyFNSV7PpegsYz o6p1krdPOJIEoDQIKjPzJUztENYNEm2Ifa X-Google-Smtp-Source: AGHT+IFW/UvqN9ggE4SrJhqo+HEG0e1wVR8L2gmAbQOxQkM94PZd3B4pZSXlFmWtKX442RdLM0eCXdzZ9lpGXZLs/ww= X-Received: by 2002:a17:906:620a:b0:ad2:2d74:a1b with SMTP id a640c23a62f3a-ad22d74107dmr179888066b.45.1746832771147; Fri, 09 May 2025 16:19:31 -0700 (PDT) MIME-Version: 1.0 From: Dustin Paluch Date: Fri, 9 May 2025 19:18:55 -0400 X-Gm-Features: AX0GCFui4gskzrytCzDKAKlwtG1gn85l_ZOE5yynDeVVetJT0KIItXYqFuAo5Ls Message-ID: Subject: 30.1; Comments with colons break paren matching in js-mode To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000ce7ed70634bc324f" Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=dustin@alley.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 10 May 2025 03:34:31 -0400 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.0 (/) --000000000000ce7ed70634bc324f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable With emacs -q, open a new file named test.jsx and confirm that js-mode is active. Add the following code: const Foo =3D () =3D> (
); M-x check-parens will report no missing parens. Then, add a comment containing a colon and call check-parens again. const Foo =3D () =3D> (
); I expect check-parens to report no missing parens, but it does, and it seems to think the opening bracket of the br element is matched with the closing parenthesis. In GNU Emacs 30.1 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.65 Version 12.7.6 (Build 21H1320)) of 2025-02-24 built on armbob.lan Windowing system distributor 'Apple', version 10.3.2487 System Description: macOS 14.6 Configured using: 'configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules 'CFLAGS=3D-DFD_SETSIZE=3D10000 -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=3Dno' Configured features: ACL GLIB GMP GNUTLS JPEG LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: JavaScript[JSX] Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-extra text-property-search noutline outline icons help-fns radix-tree help-mode time-date js c-ts-common treesit json subr-x map byte-opt gv bytecomp byte-compile imenu cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 89658 9368) (symbols 48 8852 0) (strings 32 24356 2211) (string-bytes 1 792237) (vectors 16 16141) (vector-slots 8 173353 4546) (floats 8 63 82) (intervals 56 1287 14) (buffers 992 14)) --=20 * Dustin Paluch * Senior Software Developer dustin@alley.com *=E0=A3=AD=EF=BC=BC* alley.com --000000000000ce7ed70634bc324f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
With emacs -q, open a new file named test.jsx and con= firm that js-mode is active.

Add the following cod= e:

const Foo =3D () =3D> (
=C2=A0 =C2=A0 <= ;br
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 test=3D{123}
=C2=A0 = =C2=A0 />
);

M-x check-parens will repor= t no missing parens. Then, add a comment containing a colon and call check-= parens again.

const Foo =3D () =3D> (
=C2=A0 =C2= =A0 <br
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 test=3D{123} // Co= mment: colon
=C2=A0 =C2=A0 />
);

I expect c= heck-parens to report no missing parens, but it does, and it seems to think= the opening bracket of the br element is matched with the closing parenthe= sis.

In GNU Emacs 30.1 (build 1, aarch64-apple-dar= win21.6.0, NS
=C2=A0appkit-2113.65 Version 12.7.6 (Build 21H1320)) of 20= 25-02-24 built on
=C2=A0armbob.lan
Windowing system distributor '= Apple', version 10.3.2487
System Description: =C2=A0macOS 14.6
Configured using:
=C2=A0'configure --with-ns '--enable-localli= sppath=3D/Library/Application
=C2=A0Support/Emacs/${version}/site-lisp:/= Library/Application
=C2=A0Support/Emacs/site-lisp' --with-modules &#= 39;CFLAGS=3D-DFD_SETSIZE=3D10000
=C2=A0-DDARWIN_UNLIMITED_SELECT' --= with-x-toolkit=3Dno'

Configured features:
ACL GLIB GMP GNUTLS= JPEG LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG
RSVG SQLITE3 THREADS = TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB

Important setting= s:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: ut= f-8-unix

Major mode: JavaScript[JSX]

Minor modes in effect:=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 show-pare= n-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-sh= adow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t=
=C2=A0 blink-cursor-mode: t
=C2=A0 minibuffer-regexp-mode: t
=C2= =A0 line-number-mode: t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-m= ark-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mo= de: t
=C2=A0 auto-compression-mode: t

Load-path shadows:
None = found.

Features:
(shadow sort mail-extr emacsbug message mailcap = yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache e= pa derived epg rfc6068
epg-config gnus-util mm-decode mm-bodies mm-encod= e mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rf= c2045 ietf-drums
mm-util mail-prsvr mail-utils cl-extra text-property-se= arch noutline
outline icons help-fns radix-tree help-mode time-date js c= -ts-common
treesit json subr-x map byte-opt gv bytecomp byte-compile ime= nu cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engi= ne cc-vars
cc-defs cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc= paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode = mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-b= ar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment=
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshado= w
isearch easymenu timer select scroll-bar mouse jit-lock font-lock synt= ax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-gene= ric
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese<= br>tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek<= br>romanian slovak czech european ethiopic indian cyrillic chinese
compo= site emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook hel= p abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs fa= ces cus-face macroexp files window text-properties
overlay sha1 md5 base= 64 format env code-pages mule custom widget keymap
hashtable-print-reada= ble backquote threads kqueue cocoa ns multi-tty
make-network-process ema= cs)

Memory information:
((conses 16 89658 9368) (symbols 48 8852 = 0) (strings 32 24356 2211)
=C2=A0(string-bytes 1 792237) (vectors 16 161= 41)
=C2=A0(vector-slots 8 173353 4546) (floats 8 63 82) (intervals 56 12= 87 14)
=C2=A0(buffers 992 14))


--
Dustin Paluch
Senior Software Developer
=20 =20
=E0=A3=AD=EF=BC=BC=C2=A0 alley= .com
--000000000000ce7ed70634bc324f--