From unknown Thu Sep 11 09:18:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50640: 28.0.50; incorrect highlighting in C++ mode Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Sep 2021 12:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 50640@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16318834879562 (code B ref -1); Fri, 17 Sep 2021 12:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Sep 2021 12:58:07 +0000 Received: from localhost ([127.0.0.1]:58729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRDRP-0002UA-8H for submit@debbugs.gnu.org; Fri, 17 Sep 2021 08:58:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:60246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRDRL-0002U0-6o for submit@debbugs.gnu.org; Fri, 17 Sep 2021 08:58:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRDRK-0005L1-V2 for bug-gnu-emacs@gnu.org; Fri, 17 Sep 2021 08:58:02 -0400 Received: from joooj.vinc17.net ([2001:4b99:1:3:216:3eff:fe20:ac98]:37684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRDR5-0001hO-AV for bug-gnu-emacs@gnu.org; Fri, 17 Sep 2021 08:58:02 -0400 Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id E2DE4307; Fri, 17 Sep 2021 14:57:31 +0200 (CEST) Received: by zira.vinc17.org (Postfix, from userid 1000) id A3AF3C20ED3; Fri, 17 Sep 2021 14:57:31 +0200 (CEST) From: Vincent Lefevre Date: Fri, 17 Sep 2021 14:57:31 +0200 Message-ID: <87czp79x6s.fsf@vinc17.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2001:4b99:1:3:216:3eff:fe20:ac98; envelope-from=vincent@vinc17.net; helo=joooj.vinc17.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.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: -3.3 (---) Consider a test.cc file containing: if (xMin - xt < t3Font->glyphX || yMin - yt < t3Font->glyphY || xMax - xt > t3Font->glyphX + t3Font->glyphW || yMax - yt > t3Font->glyphY + t3Font->glyphH) { } (this comes from the xpdf source) and open it with "emacs -Q". The first two "xt" and "yt" are highlighted in green instead of remaining in black. If I remove the last condition as follows and reopen the file: if (xMin - xt < t3Font->glyphX || yMin - yt < t3Font->glyphY || xMax - xt > t3Font->glyphX + t3Font->glyphW) { } then only the "yt" is highlighted incorrectly. In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2021-09-17 built on zira Repository revision: 8220df9355e105459e91623dd63f7a08a08cfe09 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --prefix=/home/vinc17/opt/emacs-master' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_COLLATE: POSIX value of $LC_CTYPE: C.UTF-8 value of $LC_TIME: en_DK.utf8 value of $LANG: POSIX locale-coding-system: utf-8-unix Major mode: C++//l Minor modes in effect: display-time-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-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 column-number-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr warnings emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cc-mode cc-fonts cc-guess cc-menus cc-cmds time cus-load paren cc-styles cc-align cc-engine cc-vars cc-defs edmacro kmacro cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-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 cl-generic 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 charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 80328 6010) (symbols 48 9599 1) (strings 32 26386 987) (string-bytes 1 979203) (vectors 16 13517) (vector-slots 8 174949 9740) (floats 8 28 46) (intervals 56 237 0) (buffers 992 12)) From unknown Thu Sep 11 09:18:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50640: 28.0.50; incorrect highlighting in C++ mode Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Sep 2021 18:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 50640@debbugs.gnu.org, Vincent Lefevre Received: via spool by 50640-submit@debbugs.gnu.org id=B50640.163259383632412 (code B ref 50640); Sat, 25 Sep 2021 18:18:02 +0000 Received: (at 50640) by debbugs.gnu.org; 25 Sep 2021 18:17:16 +0000 Received: from localhost ([127.0.0.1]:34659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUCEe-0008Qi-HA for submit@debbugs.gnu.org; Sat, 25 Sep 2021 14:17:16 -0400 Received: from mail-pf1-f171.google.com ([209.85.210.171]:37728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUCEb-0008QD-KQ for 50640@debbugs.gnu.org; Sat, 25 Sep 2021 14:17:14 -0400 Received: by mail-pf1-f171.google.com with SMTP id n23so8967734pfv.4 for <50640@debbugs.gnu.org>; Sat, 25 Sep 2021 11:17:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=07Dy293fvnf9fiN+PaqAuy+uR4alTzp63kUjJULGcT8=; b=4h10C0aGtd/OL1D571FH09ShArIvJ8E/JyNAOegDsNK7Vk1Hg2exH9WA4+fLs7IHJd rDBLKBKhNXY9Gmm9T3PeRVRkJK6NuTNqzpveX/Ce5fWJaLpMY5MFTnjTs0ZuekFNYios aE88hYGnbZurIuumpPzkyMesAMzyNCBHwFU4s/lFHT4A13SAtCr1tglaMqOsOwCsNtbo FmOOaTBnruWPdGItRjl/OuJQaussRTe/LycmCPko4rY3WvNKmkdEMY9GmNxcvlc/ACPK Hvt57ELKbaeRbul+YG+6MdtbUXKfwqb01fC0sDjfefgx2SGgwa/OhbjllOO5tnjXkFr6 qOyQ== X-Gm-Message-State: AOAM532cGN1Q6K3x0QuI5tq/++l9Pf/6QQwwo2Sojjf8wsZXi9/ruA9/ qRBq1WdSWrvd4G8Vb0+WU3B+Y+/7Z7LxBlosUWbu4Ld2BLY= X-Google-Smtp-Source: ABdhPJxIiBMwa05rzjGrvoK33aUvaZNc0qH6D72CRkLceSfVUK6BpbFe0Avutn477RJxFQDnKC1rl8diCrUcq7kOTHo= X-Received: by 2002:a05:6a00:1586:b0:447:b30c:4a65 with SMTP id u6-20020a056a00158600b00447b30c4a65mr15393484pfk.0.1632593828001; Sat, 25 Sep 2021 11:17:08 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 25 Sep 2021 11:17:07 -0700 From: Stefan Kangas In-Reply-To: <87czp79x6s.fsf@vinc17.net> (Vincent Lefevre's message of "Fri, 17 Sep 2021 14:57:31 +0200") References: <87czp79x6s.fsf@vinc17.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Sat, 25 Sep 2021 11:17:07 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" 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 (/) Vincent Lefevre writes: > Consider a test.cc file containing: > > if (xMin - xt < t3Font->glyphX || > yMin - yt < t3Font->glyphY || > xMax - xt > t3Font->glyphX + t3Font->glyphW || > yMax - yt > t3Font->glyphY + t3Font->glyphH) { > } > > (this comes from the xpdf source) and open it with "emacs -Q". > > The first two "xt" and "yt" are highlighted in green instead of > remaining in black. If I remove the last condition as follows > and reopen the file: > > if (xMin - xt < t3Font->glyphX || > yMin - yt < t3Font->glyphY || > xMax - xt > t3Font->glyphX + t3Font->glyphW) { > } > > then only the "yt" is highlighted incorrectly. Alan, could you take a look at this bug report? (I don't know if you're subscribed to the bug list, my apologies if you have already seen it.) From unknown Thu Sep 11 09:18:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50640: 28.0.50; incorrect highlighting in C++ mode Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Sep 2021 21:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas , Vincent Lefevre Cc: 50640@debbugs.gnu.org Received: via spool by 50640-submit@debbugs.gnu.org id=B50640.16326046371208 (code B ref 50640); Sat, 25 Sep 2021 21:18:02 +0000 Received: (at 50640) by debbugs.gnu.org; 25 Sep 2021 21:17:17 +0000 Received: from localhost ([127.0.0.1]:34931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUF2r-0000J8-0x for submit@debbugs.gnu.org; Sat, 25 Sep 2021 17:17:17 -0400 Received: from colin.muc.de ([193.149.48.1]:23597 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mUF2o-0000CM-AM for 50640@debbugs.gnu.org; Sat, 25 Sep 2021 17:17:15 -0400 Received: (qmail 85445 invoked by uid 3782); 25 Sep 2021 21:17:07 -0000 Received: from acm.muc.de (p2e5d55d2.dip0.t-ipconnect.de [46.93.85.210]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 25 Sep 2021 23:17:07 +0200 Received: (qmail 7856 invoked by uid 1000); 25 Sep 2021 21:17:06 -0000 Date: Sat, 25 Sep 2021 21:17:06 +0000 Message-ID: References: <87czp79x6s.fsf@vinc17.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) 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 Stefan. On Sat, Sep 25, 2021 at 11:17:07 -0700, Stefan Kangas wrote: > Vincent Lefevre writes: > > Consider a test.cc file containing: > > if (xMin - xt < t3Font->glyphX || > > yMin - yt < t3Font->glyphY || > > xMax - xt > t3Font->glyphX + t3Font->glyphW || > > yMax - yt > t3Font->glyphY + t3Font->glyphH) { > > } > > (this comes from the xpdf source) and open it with "emacs -Q". > > The first two "xt" and "yt" are highlighted in green instead of > > remaining in black. Yes. C++ Mode is recognising the < .. < .. > .. > as two nested templates. The green is font-lock-type-face. :-( > > If I remove the last condition as follows and reopen the file: > > if (xMin - xt < t3Font->glyphX || > > yMin - yt < t3Font->glyphY || > > xMax - xt > t3Font->glyphX + t3Font->glyphW) { > > } > > then only the "yt" is highlighted incorrectly. Yes, then only yt opens a "template", there being no closing > to balance the xt <. There's really not much which can be done about this in CC Mode, sorry. CC Mode's analysis of ambiguous C++ constructs is not very deep, so it sometimes gets it wrong, as here. I would be in favour of closing this bug as "won't fix" (actually, can't fix). There's an intention in the medium future to introduce rigorous analyses of source code into Emacs with a language server protocol program called "Tree Sitter". That should solve problems like this one. In the meantime, a workaround would be to change the order of the terms in that expression so that the s rather than before them, if you have control of the source code. > Alan, could you take a look at this bug report? > (I don't know if you're subscribed to the bug list, my apologies if you > have already seen it.) I'm not actually subscribed to the bug list. I'd have trouble coping with the volume of posts there. I try to skim over the archive on the web every week or so, to try not to miss anything. So thanks, Stefan, for the heads up! -- Alan Mackenzie (Nuremberg, Germany). From unknown Thu Sep 11 09:18:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50640: 28.0.50; incorrect highlighting in C++ mode Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Sep 2021 21:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 50640@debbugs.gnu.org, Stefan Kangas Received: via spool by 50640-submit@debbugs.gnu.org id=B50640.16326066826464 (code B ref 50640); Sat, 25 Sep 2021 21:52:02 +0000 Received: (at 50640) by debbugs.gnu.org; 25 Sep 2021 21:51:22 +0000 Received: from localhost ([127.0.0.1]:34986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUFZq-0001gB-DC for submit@debbugs.gnu.org; Sat, 25 Sep 2021 17:51:22 -0400 Received: from joooj.vinc17.net ([155.133.131.76]:55326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUFZo-0001g0-CK for 50640@debbugs.gnu.org; Sat, 25 Sep 2021 17:51:21 -0400 Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id 81F6A191; Sat, 25 Sep 2021 23:51:18 +0200 (CEST) Received: by zira.vinc17.org (Postfix, from userid 1000) id 83DCEC214DC; Sat, 25 Sep 2021 23:51:17 +0200 (CEST) Date: Sat, 25 Sep 2021 23:51:17 +0200 From: Vincent Lefevre Message-ID: <20210925215117.GU7497@zira.vinc17.org> References: <87czp79x6s.fsf@vinc17.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.1.3+60 (d7d7b4b3) vl-138565 (2021-09-13) X-Spam-Score: 0.0 (/) 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 2021-09-25 21:17:06 +0000, Alan Mackenzie wrote: > Hello, Vincent and Stefan. > > On Sat, Sep 25, 2021 at 11:17:07 -0700, Stefan Kangas wrote: > > Vincent Lefevre writes: > > > > Consider a test.cc file containing: > > > > if (xMin - xt < t3Font->glyphX || > > > yMin - yt < t3Font->glyphY || > > > xMax - xt > t3Font->glyphX + t3Font->glyphW || > > > yMax - yt > t3Font->glyphY + t3Font->glyphH) { > > > } > > > > (this comes from the xpdf source) and open it with "emacs -Q". > > > > The first two "xt" and "yt" are highlighted in green instead of > > > remaining in black. > > Yes. C++ Mode is recognising the < .. < .. > .. > as two nested > templates. The green is font-lock-type-face. :-( > > > > If I remove the last condition as follows and reopen the file: > > > > if (xMin - xt < t3Font->glyphX || > > > yMin - yt < t3Font->glyphY || > > > xMax - xt > t3Font->glyphX + t3Font->glyphW) { > > > } > > > > then only the "yt" is highlighted incorrectly. > > Yes, then only yt opens a "template", there being no closing > to balance > the xt <. > > There's really not much which can be done about this in CC Mode, sorry. > CC Mode's analysis of ambiguous C++ constructs is not very deep, so it > sometimes gets it wrong, as here. Note that when < .. < .. > .. > comparisons occur, there is probably || or && between them. Are C++ nested templates common with || or && inside them? If not, || and && should be forbidden in nested template matching. Alternatively, whitespace characters could also give a hint: AFAIK, for templates, this is usually no whitespace after '<' and no whitespace before '>'. -- 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 Wed Sep 29 11:20:45 2021 Received: (at control) by debbugs.gnu.org; 29 Sep 2021 15:20:45 +0000 Received: from localhost ([127.0.0.1]:49855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVbO0-0007jF-Sg for submit@debbugs.gnu.org; Wed, 29 Sep 2021 11:20:44 -0400 Received: from mail-pl1-f178.google.com ([209.85.214.178]:45603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVbNy-0007io-MI for control@debbugs.gnu.org; Wed, 29 Sep 2021 11:20:43 -0400 Received: by mail-pl1-f178.google.com with SMTP id n2so1746007plk.12 for ; Wed, 29 Sep 2021 08:20:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=qE1DN5oXTMeI15lqNaZEJuLV+DM76vPnXLckCwPRCMY=; b=yqp01KobowlzGaL6PbXGnR/T5c1bzpaN+9mgBJ74QETIeqV3peRX8tiKQwSkrnWCGE oUCYbSEJWIL4tzx5PrMhRY7Yk66nbiD2K244c9d7pSgxkaVLdarVodbmC0YtW8h9CYFo tKrdUonIpwC1ueRjiCBWMyLv4yCZi78rwRbkY0pnn8jyGqEslG2rv41o/rew6E2U2r1x 1KasKc/Y/hD6VYjWp+NFCXsyW1/P3clj/VMX1DkFt0qNlvzRwAShoJTUVHA1cZrVXazI ek508noaZUhdE1gvv04l6sPY0s1sMfazRqrp5mMDjl4sreC3ksUriTjONbksVeL2OaTI QKFQ== X-Gm-Message-State: AOAM532VqEcOCTOMncpe3qbf4C0DpHxtQvk0y2qZi1j8mmoGz41qvRvs kn19KlCnlKozs6+Fp0ygkd8r4ANKbF5nim30Wjsz9eIU X-Google-Smtp-Source: ABdhPJwB0C9XxWAqXNDLFMZFMY9q3ERoKs9BfFOWXA1OvvOdoq/vgTfcdjG5dA2RlGq0oA4ETfR062CF9HdSpaXCmCA= X-Received: by 2002:a17:902:c1c5:b0:13e:2e1e:aaa4 with SMTP id c5-20020a170902c1c500b0013e2e1eaaa4mr249734plc.32.1632928837075; Wed, 29 Sep 2021 08:20:37 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 29 Sep 2021 08:20:36 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Wed, 29 Sep 2021 08:20:36 -0700 Message-ID: Subject: control message for bug #50640 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) 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.5 (/) severity 50640 minor quit From unknown Thu Sep 11 09:18:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50640: 28.0.50; incorrect highlighting in C++ mode Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Aug 2022 11:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 50640@debbugs.gnu.org, Vincent Lefevre , Stefan Kangas Received: via spool by 50640-submit@debbugs.gnu.org id=B50640.166151415515831 (code B ref 50640); Fri, 26 Aug 2022 11:43:01 +0000 Received: (at 50640) by debbugs.gnu.org; 26 Aug 2022 11:42:35 +0000 Received: from localhost ([127.0.0.1]:52488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRXjO-00047H-TF for submit@debbugs.gnu.org; Fri, 26 Aug 2022 07:42:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRXjN-000473-1R for 50640@debbugs.gnu.org; Fri, 26 Aug 2022 07:42:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To: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=oY7qaGev5otMMZ3eEuQJ7m9c8ME7gRMb2aEScioml2M=; b=arxubRMcJRIVqfUhooPXSn1t7W 532IQFyRFPFRShuALpi2S19o1C3Y0FIOttSWQaW3hsqszDjVt4l7Rhp5y3wrc86tpb6zyZLE7z5+A uhFcbK37qsyxddyqldROKgkepTkIgccA34/xiLLlJnkr69bqrGuV8IfjYyxLhgzC4tzg=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRXjE-0000fo-GQ; Fri, 26 Aug 2022 13:42:26 +0200 From: Lars Ingebrigtsen In-Reply-To: (Alan Mackenzie's message of "Sat, 25 Sep 2021 21:17:06 +0000") References: <87czp79x6s.fsf@vinc17.net> X-Now-Playing: David Sylvian's _Dead Bees on a Cake_: "God Man" Date: Fri, 26 Aug 2022 13:42:24 +0200 Message-ID: <87k06vcjtr.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Mackenzie writes: > There's really not much which can be done about this in CC Mode, sorry. > CC Mode's analysis of ambiguous C++ constructs is not very deep, so it > sometimes gets it wrong, as here. > > I would be in [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.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: -3.3 (---) Alan Mackenzie writes: > There's really not much which can be done about this in CC Mode, sorry. > CC Mode's analysis of ambiguous C++ constructs is not very deep, so it > sometimes gets it wrong, as here. > > I would be in favour of closing this bug as "won't fix" (actually, can't > fix). OK; closing this as a "wontfix", then. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 26 07:42:40 2022 Received: (at control) by debbugs.gnu.org; 26 Aug 2022 11:42:40 +0000 Received: from localhost ([127.0.0.1]:52491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRXjU-00047Y-79 for submit@debbugs.gnu.org; Fri, 26 Aug 2022 07:42:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRXjQ-000478-LW for control@debbugs.gnu.org; Fri, 26 Aug 2022 07:42:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type: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=wPrThC5egR/DFSve407nVgpEdV64gvQ/cIHAct0AcEU=; b=Osflr90uWwTjkSscbWZBtpfVdq 2//DBuHUqPBAaBVL18slsEk+A8Ho9HoqpZxbs5mXAUDGYVjwTXNTtUXG8Fk9u6jGMfTzO7O/wy63/ nKQwcFE4vEELUN8/lVpRfRHuZMuHh1JsUcsWPID9gcAH4wbrhRfHH3ThCNcrLeRflxQw=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRXjJ-0000fx-2Q for control@debbugs.gnu.org; Fri, 26 Aug 2022 13:42:31 +0200 Date: Fri, 26 Aug 2022 13:42:28 +0200 Message-Id: <87ilmfcjtn.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50640 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 50640 wontfix close 50640 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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: -3.3 (---) tags 50640 wontfix close 50640 quit From unknown Thu Sep 11 09:18:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50640: 28.0.50; incorrect highlighting in C++ mode Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Aug 2022 12:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix To: Lars Ingebrigtsen Cc: 50640@debbugs.gnu.org, Alan Mackenzie , Stefan Kangas Received: via spool by 50640-submit@debbugs.gnu.org id=B50640.166151665812904 (code B ref 50640); Fri, 26 Aug 2022 12:25:01 +0000 Received: (at 50640) by debbugs.gnu.org; 26 Aug 2022 12:24:18 +0000 Received: from localhost ([127.0.0.1]:52572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRYNm-0003M4-2U for submit@debbugs.gnu.org; Fri, 26 Aug 2022 08:24:18 -0400 Received: from joooj.vinc17.net ([155.133.131.76]:39396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRYNd-0003Lo-Fk for 50640@debbugs.gnu.org; Fri, 26 Aug 2022 08:24:17 -0400 Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id 49C78274; Fri, 26 Aug 2022 14:24:08 +0200 (CEST) Received: by zira.vinc17.org (Postfix, from userid 1000) id 24B8828001DF; Fri, 26 Aug 2022 14:24:08 +0200 (CEST) Date: Fri, 26 Aug 2022 14:24:08 +0200 From: Vincent Lefevre Message-ID: <20220826122408.GH61030@zira.vinc17.org> References: <87czp79x6s.fsf@vinc17.net> <87k06vcjtr.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87k06vcjtr.fsf@gnus.org> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.7+32 (d84696f2) vl-149028 (2022-08-22) X-Spam-Score: 0.0 (/) 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 2022-08-26 13:42:24 +0200, Lars Ingebrigtsen wrote: > Alan Mackenzie writes: > > > There's really not much which can be done about this in CC Mode, sorry. > > CC Mode's analysis of ambiguous C++ constructs is not very deep, so it > > sometimes gets it wrong, as here. > > > > I would be in favour of closing this bug as "won't fix" (actually, can't > > fix). > > OK; closing this as a "wontfix", then. Isn't it really possible to have an option to forbid && and || in <...> constructs? I think that this would be useful in practice, because when && or || is involved, < and > around them probably mean comparisons. Note that the issue is more general than nested < .. < .. > .. >. Bad highlighting also occurs just with "a < b || c > d". -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)