From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Newsgroups: gmane.emacs.bugs Subject: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as parentheses Date: Wed, 17 Apr 2024 12:47:25 +0200 Message-ID: <87le5cuuyq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26329"; mail-complaints-to="usenet@ciao.gmane.io" To: 70435@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 17 12:48:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rx2pv-0006fP-Ef for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Apr 2024 12:48:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rx2pY-00076l-KS; Wed, 17 Apr 2024 06:47:56 -0400 Original-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 1rx2pX-00075l-3V for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2024 06:47:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rx2pW-0007tP-RC for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2024 06:47:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rx2pj-00038Q-99 for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2024 06:48:07 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Apr 2024 10:48:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70435 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171335088412012 (code B ref -1); Wed, 17 Apr 2024 10:48:06 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Apr 2024 10:48:04 +0000 Original-Received: from localhost ([127.0.0.1]:45860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx2pc-000377-UL for submit@debbugs.gnu.org; Wed, 17 Apr 2024 06:48:03 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:51434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx2pY-00035M-6G for submit@debbugs.gnu.org; Wed, 17 Apr 2024 06:47:59 -0400 Original-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 1rx2pF-0006nf-DI for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2024 06:47:37 -0400 Original-Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rx2pD-0007sB-6N for bug-gnu-emacs@gnu.org; Wed, 17 Apr 2024 06:47:37 -0400 Original-Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a44ad785a44so659006766b.3 for ; Wed, 17 Apr 2024 03:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713350853; x=1713955653; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=y7IGzdT+ni6+Lcj2CE83TH8GyZfdUTkMlRHsmzfu+so=; b=S1CikmT6eeC/o0QvPT/v3V8pipols4areT6mLeH9HTjyu043IxqCr7fnzRO3TCKyH1 /IrFPPylXYoSxHtHsNEOUB/Y8oXD3PvUFsAg4R5fbKCTxC8BJX94BZaetmJ0qcQV422M TKwAt9Ft/KgzGXHlpvkzzHcxeiz9xvGNCl14jxWocm4R4x7mlGqWubRxyHqjFAaDv5Oj GibORiCNEFScY+zEo3gPbX/+M23MqKcq1ipDd1d3Og8fFiSt6SLbBigCzO9Tg8ogRv7P 1mYNl7C3lLdZB1X6wbboIY29IQ8yVCw/6Y8X82zHJt1OPdSjnzSYL2WmzdvES/NKqv9C jfFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713350853; x=1713955653; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=y7IGzdT+ni6+Lcj2CE83TH8GyZfdUTkMlRHsmzfu+so=; b=ixLGPaGFTOxIDXvBz93feqnoleehsQwl1I3MBB5y1pgmthVkMA0POxmg0OeSvJcQio rZE6Uv0ZPc2CUkZ3QHuhnVX8+E9n50ceKsUkdJ7qaJmQQy/je3sRjuoc/PZYX+kltSnF qc28xfwA6/EZlQSl5eR/dWv/9DU78AVj/QLGtmXxYVOsqDzByFQOijpjjjh3IkI/Zmyp Vs5RJvXbh2bo+0iteIa3BH1BGBQe9xUX2BYQWkjz54fvsBWW1kSEdMi53xVYZBiM5xEZ X2lK3STmR/rgkx+dSXjZehfcvK95ZmpiNyDF2sunPTA0xjwGJumAiyZumoGVVi+J0aEo 5Luw== X-Gm-Message-State: AOJu0YxxJE5MIQQmLM1pLr/7Cnsn401nsrc8F/ulGPWadOxowOhfIVeS Wmkpdj435vyxHdlwG9bsNnxqWQC362XDDxvODqaH2/Ea4xR3SbJW3fZngw== X-Google-Smtp-Source: AGHT+IG6gN5BbXWAMRPl42dOgHqRGVlXU972LIWH5BWzROLvCtYeFSTUPCcQfkn8sP0IhKyLQdqqTA== X-Received: by 2002:a17:906:b354:b0:a51:c6ec:e4f with SMTP id cd20-20020a170906b35400b00a51c6ec0e4fmr8500180ejb.37.1713350852705; Wed, 17 Apr 2024 03:47:32 -0700 (PDT) Original-Received: from localhost (netacc-gpn-4-8-242.pool.yettel.hu. [84.224.8.242]) by smtp.gmail.com with ESMTPSA id l1-20020a17090615c100b00a524e3f2f9esm5615401ejd.98.2024.04.17.03.47.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 03:47:32 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=geza.herman@gmail.com; helo=mail-ej1-x632.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, FREEMAIL_FROM=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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283480 Archived-At: This is a subtle bug. In some cases, <> template delimiters are not recognized as delimiters, but punctuation characters. Repro: - put the yasnippet file (included below) into /snippets/c++-mode/something - install yasnippet - start emacs - M-x c++-mode - M-x yas-minor-mode - load snippets with "M-x yas-reload-all" - write "ig", then press TAB to "yas-expand" the snippet - move the cursor on the opening "<", and execute "M-x describe-char" - notice that it will say "syntax: . which means: punctuation" - if you edit the buffer (like add a space somewhere), and execute describe-char again, Emacs will say "syntax: > which means: open, matches >", so the syntax class becomes correct. A possible explanation for this is that yasnippet edits the buffer in a way that cc-mode doesn't notices the edit, so it has no chance to put the correct syntax info on the inserted characters. This is the snippet file (a simple template declaration): --8<---------------cut here---------------start------------->8--- # -*- mode: snippet -*- # name: something # key: ig # -- template <${1:typename AAA}> struct Foo; --8<---------------cut here---------------end--------------->8--- In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, cairo version 1.18.0) of 2024-04-12 built on okoska Repository revision: b83d0d07bb316cd851517897a9d688d639441f90 Repository branch: my-modifications Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-native-compilation --without-compress-install --without-gconf --without-gsettings --without-dbus --with-small-ja-dic --with-json --with-xinput2 --with-x-toolkit=no --with-tree-sitter --with-cairo --with-cairo-xcb --disable-silent-rules 'CFLAGS=-mtune=native -march=native -g3 -O3'' Configured features: ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY OLDXMENU PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM ZLIB Important settings: value of $LC_ALL: C.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: vertico-multiform-mode: t recentf-mode: t which-key-mode: t global-auto-revert-mode: t savehist-mode: t ws-butler-global-mode: t ws-butler-mode: t diff-hl-flydiff-mode: t global-diff-hl-mode: t clean-aindent-mode: t global-whitespace-mode: t marginalia-mode: t vertico-mode: t global-anzu-mode: t anzu-mode: t global-evil-matchit-mode: t evil-matchit-mode: t evil-snipe-override-mode: t evil-snipe-mode: t evil-snipe-override-local-mode: t evil-snipe-local-mode: t global-evil-surround-mode: t evil-surround-mode: t global-evil-visualstar-mode: t evil-visualstar-mode: t better-jumper-mode: t better-jumper-local-mode: t evil-leader-mode: t global-evil-leader-mode: t global-hl-todo-mode: t winum-mode: t hes-mode: t gcmh-mode: t global-page-break-lines-mode: t evil-mode: t evil-local-mode: t save-place-mode: t override-global-mode: t minibuffer-depth-indicate-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-history-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t abbrev-mode: t Load-path shadows: /home/geza/.emacs.d/elpa/transient-20240226.2332/transient hides /usr/local/share/emacs/30.0.50/lisp/transient ~/.emacs.d/lisp/emacs-gdb/gdb-mi hides /usr/local/share/emacs/30.0.50/lisp/progmodes/gdb-mi Features: (shadow sort project mail-extr emacsbug message mailcap yank-media puny evil-collection-dired dired-git-info peep-dired dired-narrow delsel dired-filter f s dired-aux dired-x dired-subtree dired-hacks-utils evil-collection-wdired wdired ls-lisp dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree mule-util cursor-sensor evil-collection-consult consult-dir vertico-multiform consult-compile compile evil-collection-comint comint ansi-osc ansi-color recentf tree-widget wid-edit shut-up consult bookmark text-property-search pp face-remap drag-stuff which-key autorevert filenotify savehist bm evil-collection-info info ws-butler diff-hl-flydiff diff diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode clean-aindent-mode column-enforce-mode whitespace orderless marginalia vertico anzu evil-matchit evil-matchit-evil-setup evil-matchit-sdk semantic/lex semantic/fw eieio eieio-core mode-local find-func evil-exchange evil-args evil-indent-plus evil-textobj-line evil-textobj-entire evil-textobj-column evil-textobj-anyblock evil-snipe evil-surround evil-mc evil-mc-command-execute evil-mc-command-record evil-mc-cursor-make evil-mc-region evil-mc-cursor-state evil-mc-undo evil-mc-vars evil-mc-known-commands evil-mc-common avy evil-visualstar evil-collection-simple evil-collection-replace evil-collection annalist better-jumper pcase cl-macs evil-leader hl-todo compat hl-line transpose-frame winum dash ov highlight-escape-sequences gcmh page-break-lines evil evil-integration evil-maps evil-commands reveal evil-jumps evil-command-window evil-types evil-search evil-ex evil-macros evil-repeat evil-states evil-core evil-common thingatpt rect evil-vars ring edmacro kmacro byte-opt saveplace bind-key easy-mmode advice mb-depth comp cl-seq comp-cstr cl-extra help-mode warnings icons subr-x gv cl-loaddefs cl-lib comp-run bytecomp byte-compile comp-common rx rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen 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 inotify lcms2 dynamic-setting font-render-setting cairo xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 269016 316498) (symbols 48 23000 189) (strings 32 74049 29305) (string-bytes 1 3233199) (vectors 16 36374) (vector-slots 8 426217 134450) (floats 8 230 192) (intervals 56 2422 251) (buffers 992 12))