From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yang Yingchao via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61208: 29.0.60; treesit-beginning/end-of-defun problem with macros in c-ts-mode Date: Wed, 01 Feb 2023 14:33:24 +0800 Message-ID: References: Reply-To: yingchao.yang@seaboxdata.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23727"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yang.yingchao@qq.com To: 61208@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 01 10:17:05 2023 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 1pN9Em-000626-BF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Feb 2023 10:17:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pN9Bv-00077O-F7; Wed, 01 Feb 2023 04:14:07 -0500 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 1pN9Br-00076V-O1 for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 04:14:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pN9Bq-0001GR-Ka for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 04:14:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pN9Bq-0005aJ-7t for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 04:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yang Yingchao Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Feb 2023 09:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61208 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.167524279621393 (code B ref -1); Wed, 01 Feb 2023 09:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Feb 2023 09:13:16 +0000 Original-Received: from localhost ([127.0.0.1]:56445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pN9B0-0005Yr-GX for submit@debbugs.gnu.org; Wed, 01 Feb 2023 04:13:16 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:39102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pN6hy-0006YB-Qs for submit@debbugs.gnu.org; Wed, 01 Feb 2023 01:35:04 -0500 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 1pN6hy-0006tK-Eg for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 01:35:02 -0500 Original-Received: from out203-205-221-155.mail.qq.com ([203.205.221.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pN6hp-0006pN-Ak for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 01:34:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1675233289; bh=tSdfXirZYrb/vBXzV3k3H7H4c30P8FDY+6GJ2RaLewE=; h=From:Reply-To:To:Cc:Subject:Date:In-reply-to; b=w+vcm5EmOm6JdxjuF8ucKdtvinNAy2nycSQlY8jrxY9nOeb7zIhmIzUnhLgiZwhDl J/nizcQfPMpXjE+2DtJ4olW6fB6CQK5HlAKV7CiAU8yAQg88g9NcSNBh1P2o+OO2NS uT2Ylm+FAzLMKMTvRjcFxXqkLmbsm+eZ3q2mqmjc= Original-Received: from tbook ([60.26.148.134]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id 8B08C0CA; Wed, 01 Feb 2023 14:34:48 +0800 X-QQ-mid: xmsmtpt1675233288t1ky4p9hp X-QQ-XMAILINFO: NvKyM24IHTKSmw8/uQqCtGQBcH3MzXne2IxHka9kTF7Ch6qUX1SEt7rZwXm0mX wYLQdxfkq2mLxTOm8e60bANJx+JvOi6wOlUrssyKLUqzbTMVdFyfHvorTkwBagy2d83NeCMTegUm 6WFHF4AfDkDTzxHn/RSFkU/SGcjppifMLlzuoIXzxsPAFIYCpSv7i3zUzDJNERS/otOloIdnZ30k 5BspjV/FZ4yglCNfw6BGSZOnT1tb8/66bp+WqJzt92+MTZFCT+UoN8K00WXOwK4mCoiITfim9cSA q9X7bX7iXFga7eF4q9xjYVf2Pry9atNz6ITuZic3M4AFXyTvxhK9oMHQrc3E3sWR2FjU2q7ORtUB ctYh5LHOO6D7YGbnJHTy9myrWLsbZPy29ES04QtOqznEa8HjOYGAKlbyZ6QIRBg7YvyhncehmTWI hHYgFAR5jghPRtu2PoYmVyRiQkVGSAwwrBElnzKgYiTXMUJCl5M4i45hWcbEss3gUZ/agFf8Ftqb OPWJg/0DdgfdIzGP9qRRXVq4EB8LOIqMK4OpxkzEjyAXbBqQDY/D7AsC+OcluGsXw0WV3/lQukZn 2Us3Db7Wwe4/InXU89OWaZlfa5WPAHUpjlzDJwccyvP+91IBBwmnW7rClX1QvDJxHt7KlIrSkzwQ +7y4bgt4Nk5I8/+TMvPGStcF33RvNf9EoF/X19J4s2yErvscfZ1UBEqmPq41+Hmw7IEqvGWMvRKE roFb7OGXEbdB2JrV4yqWVKwpp4S0B5epPN3bbNdahTSxuCb1L8+z1WDKRZMVzueGoDCQ8/83W6yi 8J3pDoJewvvQUgYpYBUcndl67Rkb6A2m8egg12ls X-OQ-MSGID: <87o7qd99md.fsf@qq.com> In-reply-to: Received-SPF: pass client-ip=203.205.221.155; envelope-from=yang.yingchao@qq.com; helo=out203-205-221-155.mail.qq.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 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, HELO_DYNAMIC_IPADDR=1.951, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 01 Feb 2023 04:13:09 -0500 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: , X-ACL-Warn: , Yang Yingchao 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:254567 Archived-At: #define SWITCH() #define CASE(name) case name: void func(int i) // LINE_E { SWITCH(i) // LINE_D { CASE(A) // LINE_C { ; } CASE(B) // LINE_B { ; // LINE_A } } } When cursor is at LINE_A, and stoke `C-M-a`, cursor will go to LINE_B; then `C-M-a` again, cursor goes to LINE_C, then `C-M-a` again, LINE_D, and `C-M-a` again, finally to LINE_E... On Wed, Feb 01 2023, Yang Yingchao wrote: > Forgive me the mess... > > > src > > > On Wed, Feb 01 2023, Yang Yingchao wrote: > >> Hi **, >> >> From: Yang Yingchao Reply-To: yang.yingchao@qq.com >> Date: Wed, 01 Feb 2023 14:19:30 +0800 Cc: yang.yingchao@qq.com To: >> bug-gnu-emacs@gnu.org Subject: 29.0.60; treesit-beginning/end-of-defun problem >> with macros in c-ts-mode –text follows this line– >> >> treesit-beginning/end-of-defun in c-ts-mode not work correctly with macros. >> >> For example, in the following codes: >> >> #define SWITCH() #define CASE(name) case name: >> >> void func(int i) / LINE_E { SWITCH(i) / LINE_D { CASE(A) / LINE_C { ; } CASE >> (B) / LINE_B { ; // LINE_A } } } >> >> When cursor is at LINE_A, and stoke `C-M-a`, cursor will go to LINE_B; then >> `C-M-a` again, cursor goes to LINE_C, then `C-M-a` again, LINE_D, and `C-M-a` >> again, finally to LINE_E… >> >> Regards… >> >> In GNU Emacs 29.0.60 (build 15, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, >> cairo version 1.17.6) of 2023-02-01 built on tbook Repository revision: >> c345ec43995051e3fb412cfb8f24d0e931b7de5e Repository branch: yc-hacking System >> Description: Gentoo Linux >> >> Configured using: 'configure 'CFLAGS=-O2 -march=native -pipe -g' LDFLAGS= – >> with-native-compilation –without-pop –without-imagemagick –with-xml2 – >> with-json –with-modules –with-pgtk' >> >> Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS >> HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY >> PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS >> TREE_SITTER WEBP XIM GTK3 ZLIB >> >> Important settings: value of $LANG: zh_CN.UTF8 value of $XMODIFIERS: @im=fcitx >> locale-coding-system: utf-8-unix >> >> Major mode: C >> >> 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 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 text-property-search 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 c-ts-mode c-ts-common treesit >> pp cl-print byte-opt thingatpt help-fns radix-tree cc-mode cc-fonts cc-guess >> cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs comp >> comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra help-mode >> bytecomp byte-compile cl-lib china-util rmc iso-transl tooltip cconv eldoc >> paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel >> term/pgtk-win pgtk-win term/common-win pgtk-dnd 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 dbusbind inotify dynamic-setting >> system-font-setting font-render-setting cairo gtk pgtk lcms2 multi-tty >> make-network-process native-compile emacs) >> >> Memory information: ((conses 16 116552 13400) (symbols 48 9439 0) (strings 32 >> 29132 1837) (string-bytes 1 934955) (vectors 16 19030) (vector-slots 8 379928 >> 16623) (floats 8 36 34) (intervals 56 432 0) (buffers 984 14)) >> >> – Yang Yingchao Yang Yingchao Yang Yingchao