From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 18 16:22:44 2012 Received: (at submit) by debbugs.gnu.org; 18 Jul 2012 20:22:44 +0000 Received: from localhost ([127.0.0.1]:48994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sralg-0007bl-CL for submit@debbugs.gnu.org; Wed, 18 Jul 2012 16:22:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35057) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srale-0007be-Bm for submit@debbugs.gnu.org; Wed, 18 Jul 2012 16:22:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Srafh-0001ju-F5 for submit@debbugs.gnu.org; Wed, 18 Jul 2012 16:16:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:45497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Srafh-0001jq-C2 for submit@debbugs.gnu.org; Wed, 18 Jul 2012 16:16:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Srafg-0003mG-54 for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 16:16:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Srafe-0001jQ-JU for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 16:16:32 -0400 Received: from relay2.ptmail.sapo.pt ([212.55.154.22]:34750 helo=sapo.pt) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Srafe-0001ir-8l for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 16:16:30 -0400 Received: (qmail 7503 invoked from network); 18 Jul 2012 20:16:27 -0000 Received: from unknown (HELO sapo.pt) (10.134.37.162) by relay2 with SMTP; 18 Jul 2012 20:16:27 -0000 Received: (qmail 22351 invoked from network); 18 Jul 2012 20:16:25 -0000 Received: from unknown (HELO rolando-desktop) (finalyugi@sapo.pt@[188.37.127.54]) (envelope-sender ) by mta12 (qmail-ptmail-1.0.0) with AES128-SHA encrypted SMTP for ; 18 Jul 2012 20:16:19 -0000 From: Rolando Pereira To: bug-gnu-emacs@gnu.org Subject: 24.1.50; (Contains ERT Test) show-paren-mode doesn't work in C comments if there's a quote between the parenthesis (affects c-mode and modes derived from it) Date: Wed, 18 Jul 2012 21:16:17 +0100 Message-ID: <87d33sn7u6.fsf@sapo.pt> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -6.1 (------) In c-mode if you type the following comment with M-x show-paren-mode activated, the closing parenthesis is highlighted correctly: // Lorem ipsum (dolor sit amet) However, if the ' character appears inside the parenthesis, then show-paren-mode won't match them. For example, when typing the following comment, show-paren-mode highlights the closing parenthesis using show-paren-mismatch: // Comments are good (aren't they?) I tried to make an ERT test that would check if the parenthesis was highlighted correctly, but I couldn't get the overlay that show-paren-mode uses. However I found out that forward-sexp also doesn't work when the ' character appears between parenthesis, which makes me think the problem may be somewhere in the syntax-table used by c-mode. Here's the ERT test: (ert-deftest cc-mode-should-forward-sexp-with-quotes-inside () "Check if `forward-sexp' works in c-mode when the cursor is inside a comment and there's a ' character inside the parenthesis" (with-temp-buffer (c-mode) (insert "// Comments are good (aren't they?)") (goto-char (point-min)) (search-forward "(") (backward-char 1) (forward-sexp) (ert-should (= (point) 36)))) Also, the reason I think that the problem only affects c-mode and modes that derive from it is because this problem doesn't show up in emacs-lisp-mode or lisp-mode. Here's how to see the problem when starting emacs with the -Q flag: 1. Create the temporary buffer "temp-buffer" with C-x b temp-buffer RET 2. Activate c-mode with M-x c-mode 3. Activate show-paren-mode with M-x show-paren-mode 4. Write "// Comments are good (aren't they?)" 5. When typing the closing parenthesis, notice that it's highlighted with the face show-paren-mismatch Another test that can be used that doesn't use show-paren-mode but still shows wrong behaviour is the following: 1. Create the temporary buffer as before 2. Activate c-mode as before 2. Write "// Comments are good (aren't they?)" 3. When typing the closing parenthesis, notice that the minibuffer shows the message "No matching parenthesis found". In GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2012-07-15 on rolando-desktop Bzr revision: 109096 dmantipov@yandex.ru-20120715111709-pa3d1hni2gmjdux0 Windowing system distributor `The X.Org Foundation', version 11.0.10706000 Important settings: value of $LANG: pt_PT.utf8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Starting new Ispell process [/usr/bin/aspell::default] ... Checking spelling of PARENTHESIS... byte-code: Window # too small for splitting Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr ispell emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 23:27:45 2017 Received: (at control) by debbugs.gnu.org; 25 Mar 2017 03:27:45 +0000 Received: from localhost ([127.0.0.1]:43042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crcMj-0002Hy-Bo for submit@debbugs.gnu.org; Fri, 24 Mar 2017 23:27:45 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:38046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crcMh-0002Hk-Pt for control@debbugs.gnu.org; Fri, 24 Mar 2017 23:27:44 -0400 Received: by mail-it0-f44.google.com with SMTP id y18so7934873itc.1 for ; Fri, 24 Mar 2017 20:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=9WiKPh9P+oUnB3HqbZaiBjaELu+yJJKDtklSDFK4ue8=; b=PdGcvzR1XHf7gqgLSvEcqM0D2vmcI171RY4nodocWpYsp0H5HgrauHpFa93Kv3uaiG SNE2OYolKeKDSk5N63M4ffleGcwvlGgXmncyoLuRsn9u6frcKj1YQcioXM/P74pnQVVX hpx95yXqZLtc/2XUc8Hjj1P5dGLBla8TxANjYvvFzb8ptMt1NwWsZEOGVGQi8F+Dhdq6 04Z7BIjek66SUqN8yfP/DWBTy/pGmcHGi+54xc6U0yShEdJuVaBOXMM0yzhw0fGk/xp4 ndJHhCHKTP+DVx26wcklN24648a/NKjn/iCy0+4ATbYxw0lPhOHtr2tLS9EXHtp+nM0g Pitg== 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:subject:date:message-id :mime-version; bh=9WiKPh9P+oUnB3HqbZaiBjaELu+yJJKDtklSDFK4ue8=; b=aaKMmZ9S75aXILU7si1QfqZ6RKPOLEYiYdEg/dA3WegtKSrt8lIOTzfdg1YoNbltS9 e7CGGG9aHZRQnGB6SS1TyP2CeDD7TbqWfubtcA2UPT53CKbpAyusAnIRtEao1DlLis4G grDnV9YkTaFE0GpBZahlooRg1Y401Lssv3+BBSA9J5yJVRcK0ndrNfcY2o5FPA9jeRJ1 syxgCPBuRv49/stSxuMhtda2RaYX4oawkA2qYjIVdEFQoYGbymZ4X9DrY0vclfht5edM xYnDC8MPmZSLkwVh4WremghIs+uGLUhj2f6geQTU7N00WycpigvoCSOb/fOBxbbZtzBz dmmg== X-Gm-Message-State: AFeK/H3Z6g6Xawb1dZL9kvfMnnfQi0T5NK6BfOsmHPVpqx8Bdlgp9nN+pA+6M0g5JzbmSw== X-Received: by 10.36.117.147 with SMTP id y141mr339479itc.67.1490412458187; Fri, 24 Mar 2017 20:27:38 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id e20sm206296itc.3.2017.03.24.20.27.37 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Mar 2017 20:27:37 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: control message for bug #11982 Date: Fri, 24 Mar 2017 23:29:01 -0400 Message-ID: <87y3vu11c2.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control 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 (/) found 11982 25.2 tags 11982 confirmed severity 11982 minor quit From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 22 09:45:05 2019 Received: (at 11982) by debbugs.gnu.org; 22 Aug 2019 13:45:05 +0000 Received: from localhost ([127.0.0.1]:37165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0nOj-00057x-8M for submit@debbugs.gnu.org; Thu, 22 Aug 2019 09:45:05 -0400 Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:35392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0nOg-00054h-Ro for 11982@debbugs.gnu.org; Thu, 22 Aug 2019 09:45:03 -0400 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.92.1) (envelope-from ) id 1i0nOf-00029b-4F; Thu, 22 Aug 2019 15:45:01 +0200 Date: Thu, 22 Aug 2019 15:45:01 +0200 From: Vincent Lefevre To: 11982@debbugs.gnu.org Subject: Re: 24.1.50; (Contains ERT Test) show-paren-mode doesn't work in C comments if there's a quote between the parenthesis (affects c-mode and modes derived from it) Message-ID: <20190822134501.GA8100@cventin.lip.ens-lyon.fr> References: <87d33sn7u6.fsf@sapo.pt> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87d33sn7u6.fsf@sapo.pt> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.12.1+19 (078654a4) vl-117499 (2019-06-15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 11982 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.0 (-) On 2012-07-18 21:16:17 +0100, Rolando Pereira wrote: > In c-mode if you type the following comment with M-x show-paren-mode > activated, the closing parenthesis is highlighted correctly: > > // Lorem ipsum (dolor sit amet) > > However, if the ' character appears inside the parenthesis, then > show-paren-mode won't match them. > > For example, when typing the following comment, show-paren-mode highlights > the closing parenthesis using show-paren-mismatch: > > // Comments are good (aren't they?) I can reproduce this bug with Emacs 26.1 from the Debian package, but the current development version seems fine. Has this bug been fixed? -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 22 11:05:15 2019 Received: (at 11982) by debbugs.gnu.org; 22 Aug 2019 15:05:15 +0000 Received: from localhost ([127.0.0.1]:38117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0oeJ-0002zn-3t for submit@debbugs.gnu.org; Thu, 22 Aug 2019 11:05:15 -0400 Received: from mail-io1-f44.google.com ([209.85.166.44]:39669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0oeG-0002zP-21; Thu, 22 Aug 2019 11:05:13 -0400 Received: by mail-io1-f44.google.com with SMTP id l7so12511205ioj.6; Thu, 22 Aug 2019 08:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=kUNOIWCW37XvcdtL1JLluvw8A3weFganflVtM3/dYRI=; b=X+MpCbTnP22UFnZ+32c0MKFIUdthVB3rwXEjAqy8PG8pYe+2Ut5WDBRSOKRvYlByzr cW5eZ4iTsGeJES5emvO4t1HjKOkn43xQYuoanZMSYKtcXxJqeU0gYgWt16nm2AASMke3 yDoR2ZwafyCmfrHFcon327j2658UQ6WId31c1rCc5ugnc8k98iTFAJfSI9RhAM5hm23S pT2JTzXvCHUVetw3/Mcfqik/S7L6bdbtFxVzrFXM9hOY1FtMKUV4zXT/xftG5u6sUUb2 oYDxYgRvyBCMlYqtggTsdkjuoajX8mzrTqz/RDQPSH1LZlHWAuPV9p11pE7Kq+F+N2pt FmtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=kUNOIWCW37XvcdtL1JLluvw8A3weFganflVtM3/dYRI=; b=r/+s8MfQIyYlU1lCC62yqW14SSEy4z4owoZiAwAHu48Eo4n8TQWs/6O/nww+w7M/3o YrcNydW8fGNnJQYJcrsPdy3PSqUTjsCdikw9dKgk0G0yZ/rM+hqfZc9l8J8u+VWbkByD bD32ZkaO9YjXxfOgKNEwPiLV3coUEhc3TT1s9wmWQBZ3dn7vCa1NBjg0FeWvJCWeIN7Q mTVmneVOnSiPNw8ktJLi8otnJ1YHBzmVZIwuOcUrvchyGGyVpI2me8lSZ7MCd80Akikr NEf0h1zAnUktgxRl423Gtsx6GbRV1waZELsFCnWSqAiM+sdj1WwYE1qLLhUBforonS3k IDFA== X-Gm-Message-State: APjAAAV7jt79mLAjrM3RlSRTHfaSs2wd62uwxzfEcNXNg5Efih9cP629 IU03hZ0gQ4lBDFmSmIMjTdMJWVrN X-Google-Smtp-Source: APXvYqwpYKr0WDfOeqJjX+uA6NNjz1fFD9YOoGpv8ElzIx0XrWlVFpVeivxri4jseKN85gBAOEOvsA== X-Received: by 2002:a6b:6e10:: with SMTP id d16mr75130ioh.277.1566486305477; Thu, 22 Aug 2019 08:05:05 -0700 (PDT) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.51.196]) by smtp.gmail.com with ESMTPSA id s6sm12304506ioe.6.2019.08.22.08.05.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Aug 2019 08:05:05 -0700 (PDT) From: Noam Postavsky To: Vincent Lefevre Subject: Re: bug#11982: 24.1.50; (Contains ERT Test) show-paren-mode doesn't work in C comments if there's a quote between the parenthesis (affects c-mode and modes derived from it) References: <87d33sn7u6.fsf@sapo.pt> <20190822134501.GA8100@cventin.lip.ens-lyon.fr> Date: Thu, 22 Aug 2019 11:05:04 -0400 In-Reply-To: <20190822134501.GA8100@cventin.lip.ens-lyon.fr> (Vincent Lefevre's message of "Thu, 22 Aug 2019 15:45:01 +0200") Message-ID: <85h869jl5r.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 11982 Cc: 11982@debbugs.gnu.org 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.0 (-) found 11982 25.3 tags 11982 fixed close 11982 26.1 quit Vincent Lefevre writes: > On 2012-07-18 21:16:17 +0100, Rolando Pereira wrote: >> In c-mode[...] when typing the following comment, show-paren-mode highlights >> the closing parenthesis using show-paren-mismatch: >> >> // Comments are good (aren't they?) > > I can reproduce this bug with Emacs 26.1 from the Debian package, > but the current development version seems fine. Has this bug been > fixed? I can reproduce up to 25.3, but it seems to be fixed in 26.1. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 22 11:20:24 2019 Received: (at 11982) by debbugs.gnu.org; 22 Aug 2019 15:20:24 +0000 Received: from localhost ([127.0.0.1]:38143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0osy-0005Sa-2b for submit@debbugs.gnu.org; Thu, 22 Aug 2019 11:20:24 -0400 Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:35660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0osw-0005SQ-Gd for 11982@debbugs.gnu.org; Thu, 22 Aug 2019 11:20:23 -0400 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.92.1) (envelope-from ) id 1i0osu-0005Pc-Ix; Thu, 22 Aug 2019 17:20:20 +0200 Date: Thu, 22 Aug 2019 17:20:20 +0200 From: Vincent Lefevre To: Noam Postavsky Subject: Re: bug#11982: 24.1.50; (Contains ERT Test) show-paren-mode doesn't work in C comments if there's a quote between the parenthesis (affects c-mode and modes derived from it) Message-ID: <20190822152020.GE1999@cventin.lip.ens-lyon.fr> References: <87d33sn7u6.fsf@sapo.pt> <20190822134501.GA8100@cventin.lip.ens-lyon.fr> <85h869jl5r.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <85h869jl5r.fsf@gmail.com> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.12.1+19 (078654a4) vl-117499 (2019-06-15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 11982 Cc: 11982@debbugs.gnu.org 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.0 (-) On 2019-08-22 11:05:04 -0400, Noam Postavsky wrote: > I can reproduce up to 25.3, but it seems to be fixed in 26.1. No, not fixed in 26.1, where this depends on some context. This is rather random, but here's a way to reproduce the bug in Debian: 1. emacs-gtk -Q foo.c (where foo.c does not exist) 2. Paste "// Comments are good (aren't they?)" 3. Type C-M-p I get an error: forward-list: Scan error: "Unbalanced parentheses", 35, 1 This problem does not occur without the apostrophe. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 22 11:48:58 2019 Received: (at 11982) by debbugs.gnu.org; 22 Aug 2019 15:48:58 +0000 Received: from localhost ([127.0.0.1]:38197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0pKc-0006CC-0c for submit@debbugs.gnu.org; Thu, 22 Aug 2019 11:48:58 -0400 Received: from mail-io1-f46.google.com ([209.85.166.46]:47075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0pKa-0006Bu-1r; Thu, 22 Aug 2019 11:48:56 -0400 Received: by mail-io1-f46.google.com with SMTP id x4so12703157iog.13; Thu, 22 Aug 2019 08:48:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=X5epjZAHNE1f+u911mXgVVDiA/VX9FFIXtx7mjT5zdg=; b=DCgQUO9nMZzdq/aelSKb1MkLjjAGMx/Q5qB1sYsrWmbKSJi9iMx5fp/4MXwGDRAsTK CXxPaoS9J03G3ymbNF7G9YR+6u/uyHJERNzOBYH6EuvOZlIxYiE9Fpnq4J3Li6mMnNVh xv64q6Cy7wIOzN+IFwLeem2hJHAmC78ITbkEtDpu/2NUc2UBLQrC/8Ef6P5IbupkHY0z ziF1W/qO439ZU2SeYntQXzO9Tcnr3VxwBM78fJHDgTB4Iqc6/gG9sgxVoovuauJG89bk HxzggSV0hOi0VC/4DG9Qvfo1OfRuB1+FJurZtfAi+pCIjUOXMxmFc3xAxyq82SEBy0Sb M6sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=X5epjZAHNE1f+u911mXgVVDiA/VX9FFIXtx7mjT5zdg=; b=DH+W1Xj+WkUOyqPamTjxr4u2p5dQznalDheh6RYVJ7r1E9sHkcugCWGkveD35wMPnP q4VpbJx1FrfP3m8sVPiI6qnUmGODMx5LFCNhO5p5Q0rYVK6rbLBcPZJWvIR+CfIK/v0B RjS62IgUo8PzIXpnknMlw+dBH4LTOhmfIuKh70dLR8dRmqd8MyRjzD6lzZQJXwgP4zpG O0UKlJX8oiXvZZtSlhlwYiZ6SAgPzLb2HdEMfUPuSf+YwHV21j/i61ZC+uqZqlZfPo2a 3ZgDpneunHSBDNN/oP6OwngjW5fvbvqY8x2DI8JsTnjsIET+A7zrfOTJDXjQI7bQ2aUG t72w== X-Gm-Message-State: APjAAAVjCQCJala/9a43XQjKI9SD9z4KcyeYGZ3wRJxlsiG5nTTaCZJA B4CUmzR/i5sEMZ+NojyDlzWA8cSE X-Google-Smtp-Source: APXvYqy9gYZLVm/bWdOG9L7BNzcbCnjjBE/IKy1zP7rzrFxnSV8kSlFSV8/y4dN2YotiG/dQVm1K9w== X-Received: by 2002:a02:85c7:: with SMTP id d65mr143452jai.8.1566488930234; Thu, 22 Aug 2019 08:48:50 -0700 (PDT) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.51.196]) by smtp.gmail.com with ESMTPSA id n22sm20274092iob.37.2019.08.22.08.48.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Aug 2019 08:48:49 -0700 (PDT) From: Noam Postavsky To: Vincent Lefevre Subject: Re: bug#11982: 24.1.50; (Contains ERT Test) show-paren-mode doesn't work in C comments if there's a quote between the parenthesis (affects c-mode and modes derived from it) References: <87d33sn7u6.fsf@sapo.pt> <20190822134501.GA8100@cventin.lip.ens-lyon.fr> <85h869jl5r.fsf@gmail.com> <20190822152020.GE1999@cventin.lip.ens-lyon.fr> Date: Thu, 22 Aug 2019 11:48:48 -0400 In-Reply-To: <20190822152020.GE1999@cventin.lip.ens-lyon.fr> (Vincent Lefevre's message of "Thu, 22 Aug 2019 17:20:20 +0200") Message-ID: <85ef1djj4v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 11982 Cc: 11982@debbugs.gnu.org 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.0 (-) fixed 11982 27.1 notfixed 11982 26.1 quit Vincent Lefevre writes: > On 2019-08-22 11:05:04 -0400, Noam Postavsky wrote: >> I can reproduce up to 25.3, but it seems to be fixed in 26.1. > > No, not fixed in 26.1, where this depends on some context. > This is rather random, but here's a way to reproduce the > bug in Debian: > > 1. emacs-gtk -Q foo.c > (where foo.c does not exist) > > 2. Paste "// Comments are good (aren't they?)" > > 3. Type C-M-p > > I get an error: > > forward-list: Scan error: "Unbalanced parentheses", 35, 1 > > This problem does not occur without the apostrophe. Oh, interesting, if I delete and re-insert the apostrophe, it stops happening, i.e., there is some hidden state which affects things as well. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 25 11:03:51 2019 Received: (at 11982) by debbugs.gnu.org; 25 Aug 2019 15:03:51 +0000 Received: from localhost ([127.0.0.1]:44961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i1u3b-0001BR-Fg for submit@debbugs.gnu.org; Sun, 25 Aug 2019 11:03:51 -0400 Received: from colin.muc.de ([193.149.48.1]:56209 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1i1u3X-0001BE-AM for 11982@debbugs.gnu.org; Sun, 25 Aug 2019 11:03:47 -0400 Received: (qmail 67470 invoked by uid 3782); 25 Aug 2019 14:10:58 -0000 Date: 25 Aug 2019 14:10:58 -0000 Message-ID: <20190825141058.67469.qmail@mail.muc.de> From: Alan Mackenzie To: Vincent Lefevre Subject: Re: bug#11982: 24.1.50; (Contains ERT Test) show-paren-mode doesn't work in C comments if there's a quote between the parenthesis (affects c-mode and modes derived from it) Organization: muc.de e.V. In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.4.2-20171224 ("Lochhead") (UNIX) (FreeBSD/11.2-RELEASE-p9 (amd64)) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 11982 Cc: 11982@debbugs.gnu.org, Noam Postavsky 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.0 (-) Hello, Vincent and Noam. In article you wrote: > On 2019-08-22 11:05:04 -0400, Noam Postavsky wrote: >> I can reproduce up to 25.3, but it seems to be fixed in 26.1. > No, not fixed in 26.1, where this depends on some context. This "context" is a syntax-table text property on the apostrophe which "neutralises" it's normal string syntax. Without this text property, the apostrophe, a string opener, breaks the association of the two parentheses. The code which applies and removes these syntax-table text properties is somewhat involved. I believe it is working correctly in the master branch, but wasn't in Emacs-26. > This is rather random, but here's a way to reproduce the > bug in Debian: > 1. emacs-gtk -Q foo.c > (where foo.c does not exist) > 2. Paste "// Comments are good (aren't they?)" For some value of "paste". Inserting the text on a Linux tty with the GP= M mouse utility (in 26.1) causes the text property to be correctly set. Killing the entire line with C-k, followed by yanking it with C-y leaves the text property unset (again in 26.1). > 3. Type C-M-p > I get an error: > forward-list: Scan error: "Unbalanced parentheses", 35, 1 > This problem does not occur without the apostrophe. No. The apostrophe is a "string opener", see above. It's normal use is to delimit character constants, as: char foo =3D 'F'; > --=20 > Vincent Lef=C3=A8vre - Web: > 100% accessible validated (X)HTML - Blog: > Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) --=20 Alan Mackenzie (Nuremberg, Germany). From unknown Tue Jun 17 01:47:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 23 Sep 2019 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator