From: Yang Yingchao via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 61208@debbugs.gnu.org
Cc: yang.yingchao@qq.com
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 [thread overview]
Message-ID: <tencent_911881A0ED8B42D8CF38A994235BFE02B207@qq.com> (raw)
In-Reply-To: <fc907ec5049baaaff04d38dd4ed5ab996500a50b6d723604fff453aad543dc86@mu.id>
#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 <yang.yingchao@qq.com> wrote:
> Forgive me the mess...
>
>
> src
>
>
> On Wed, Feb 01 2023, Yang Yingchao <yang.yingchao@qq.com> wrote:
>
>> Hi **,
>>
>> From: Yang Yingchao <yang.yingchao@qq.com> 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
next parent reply other threads:[~2023-02-01 6:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fc907ec5049baaaff04d38dd4ed5ab996500a50b6d723604fff453aad543dc86@mu.id>
2023-02-01 6:33 ` Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-01 12:49 ` bug#61208: 29.0.60; treesit-beginning/end-of-defun problem with macros in c-ts-mode Eli Zaretskii
2023-02-01 13:10 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-02 0:48 ` Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-02 7:16 ` Eli Zaretskii
[not found] ` <875yckubqb.fsf@qq.com>
2023-02-02 1:48 ` Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-02 2:32 ` Yuan Fu
2023-02-02 7:41 ` Eli Zaretskii
2023-02-02 18:22 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_911881A0ED8B42D8CF38A994235BFE02B207@qq.com \
--to=bug-gnu-emacs@gnu.org \
--cc=61208@debbugs.gnu.org \
--cc=yang.yingchao@qq.com \
--cc=yingchao.yang@seaboxdata.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).