From: Noah Peart <noah.v.peart@gmail.com>
To: 73832@debbugs.gnu.org
Subject: bug#73832: [PATCH] Fix misplaced paren in c-ts-mode--anchor-prev-sibling
Date: Tue, 15 Oct 2024 19:37:00 -0700 [thread overview]
Message-ID: <CAPVBTSc8P+NMbiuWdUu1kEY5vc2f_E2PYCkHkk-CcPaBd7fKzw@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 768 bytes --]
Tags: patch
It looks like a parenthesis was misplaced in the recent change to
c-ts-mode--anchor-prev-sibling causing an infinite loop during
indentation.
In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2024-10-14 built on noah-X580VD
Repository revision: 2a6f1527f6b3080c3879e6159424b824c86801a7
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Ubuntu 24.04.1 LTS
Configured using:
'configure --prefix=/usr/local --with-modules --with-tree-sitter
--with-threads --with-gnutls --with-mailutils --with-jpeg --with-png
--with-rsvg --with-tiff --with-xml2 --with-xpm --with-imagemagick
CC=gcc-13 CXX=gcc-13 CFLAGS= CXXFLAGS= PKG_CONFIG_PATH='
[-- Attachment #1.2: Type: text/html, Size: 868 bytes --]
[-- Attachment #2: 0001-Fix-misplaced-paren-in-c-ts-mode-anchor-prev-sibling.patch --]
[-- Type: text/x-patch, Size: 1247 bytes --]
From cc34936efba46568505d8801dc335f8cec8f731e Mon Sep 17 00:00:00 2001
From: Noah Peart <noah.v.peart@gmail.com>
Date: Tue, 15 Oct 2024 19:31:28 -0700
Subject: [PATCH] Fix misplaced paren in c-ts-mode--anchor-prev-sibling
* lisp/progmodes/c-ts-mode.el (c-ts-mode--anchor-prev-sibling):
Fix parentheses around condition.
---
lisp/progmodes/c-ts-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 3f6a7422aa0..0d7f95e9a6d 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -343,8 +343,8 @@ c-ts-mode--anchor-prev-sibling
;; and starting the items on the same line as {.
(_ (goto-char (treesit-node-start prev-sibling))
(if (or (looking-back (rx bol (* whitespace))
- (line-beginning-position)))
- (null (treesit-node-prev-sibling prev-sibling t))
+ (line-beginning-position))
+ (null (treesit-node-prev-sibling prev-sibling t)))
(setq continue nil)
(setq prev-sibling
(treesit-node-prev-sibling prev-sibling)))))))
--
2.43.0
next reply other threads:[~2024-10-16 2:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 2:37 Noah Peart [this message]
2024-10-16 5:36 ` bug#73832: [PATCH] Fix misplaced paren in c-ts-mode--anchor-prev-sibling Eli Zaretskii
2024-10-16 5:53 ` Yuan Fu
2024-10-16 9:03 ` Eli Zaretskii
2024-10-16 12:37 ` Noah Peart
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=CAPVBTSc8P+NMbiuWdUu1kEY5vc2f_E2PYCkHkk-CcPaBd7fKzw@mail.gmail.com \
--to=noah.v.peart@gmail.com \
--cc=73832@debbugs.gnu.org \
/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).