From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60572: 29.0.60; c-ts-mode: String spanning multiple lines are not indented Date: Sat, 07 Jan 2023 13:07:05 +0100 Message-ID: <87lemetuom.fsf_-_@thornhill.no> References: <763e1b6d1ba0fdbcc1e74414abf3842d@sadiqpk.org> <0027AF78-0A38-4F41-848E-D620D8E4F8DF@gmail.com> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23530"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mohammed Sadiq , 60572@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 07 13:08:27 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 1pE7zt-0005xc-MY for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Jan 2023 13:08:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pE7zg-0002Zz-TS; Sat, 07 Jan 2023 07:08:13 -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 1pE7zY-0002Tk-80 for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 07:08: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 1pE7zW-0002R9-W5 for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 07:08:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pE7zW-0005qE-Ic for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 07:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jan 2023 12:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60572 X-GNU-PR-Package: emacs Original-Received: via spool by 60572-submit@debbugs.gnu.org id=B60572.167309323122365 (code B ref 60572); Sat, 07 Jan 2023 12:08:02 +0000 Original-Received: (at 60572) by debbugs.gnu.org; 7 Jan 2023 12:07:11 +0000 Original-Received: from localhost ([127.0.0.1]:56630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pE7yh-0005of-GA for submit@debbugs.gnu.org; Sat, 07 Jan 2023 07:07:11 -0500 Original-Received: from out-14.mta0.migadu.com ([91.218.175.14]:31196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pE7ye-0005oV-Ex for 60572@debbugs.gnu.org; Sat, 07 Jan 2023 07:07:09 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1673093227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1PQUNwOFtOdubsXArNygQZ594ROPqpyi3h57lMQovfI=; b=lYgAiVNOlWoMRcnustyEz9i8+SF52ExgJWJmLwq4yZ8XUb2ved21dEoz8uVaG8Nb+/0kYP V+U3rI16W/b8aoa3OEuwdJU9mBUFnyt7AYZNbg5XdxSG/cjki/U3eWc/JdRDVyLhqI7IAF UQiQWAf91xcH+YmaypF1KqNTSpG3STOvlydh3foVxA9J2MrCeaqEGe8GF6kVYUzWwrYAK6 VT/OHmxaDv/dU/X6CzIOn8pwlMh/IjTKogwhL65118XOIW8udcT+1Oe/1UpC/F85pXZLNn Ow4DbTvXFJtSd3ZHwZOlyh/g/E2JjQv7N9U/q4FiHz9IGiOG7HdbD/63awf/8A== In-Reply-To: <0027AF78-0A38-4F41-848E-D620D8E4F8DF@gmail.com> (Yuan Fu's message of "Thu, 5 Jan 2023 22:51:16 -0700") X-Migadu-Flow: FLOW_OUT 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:252791 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Yuan Fu writes: > Mohammed Sadiq writes: > >> The following code doesn't indent with TAB on c-ts-mode: >> >> #include >> >> int >> main (void) >> { >> char *test =3D "some " >> "test"; >> >> puts ("more " >> "test"); >> } >> >> >> expected indentation: >> >> #include >> >> int >> main (void) >> { >> char *test =3D "some " >> "test"; >> >> puts ("more " >> "test"); >> } >> > > Thanks for the report. I=E2=80=99m on the road right now, but I=E2=80=99l= l soon get back > and work on this and your other reports, just FYI :-) > > Yuan Here is a patch fixing this, Yuan. Feel free to install at your convenience. Do you agree with this patch, Mohammed? Theo --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-indentation-rule-for-concatenated_string-bug-605.patch >From 0891cff08c2e6438902ed09291d5e52e742bab11 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Sat, 7 Jan 2023 13:04:07 +0100 Subject: [PATCH] Add indentation rule for concatenated_string (bug#60572) * lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Indent to parent-bol. --- lisp/progmodes/c-ts-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index e76966e7660..a22f1f3c44f 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -138,6 +138,7 @@ c-ts-mode--indent-styles ((parent-is "function_definition") parent-bol 0) ((parent-is "conditional_expression") first-sibling 0) ((parent-is "assignment_expression") parent-bol c-ts-mode-indent-offset) + ((parent-is "concatenated_string") parent-bol c-ts-mode-indent-offset) ((parent-is "comma_expression") first-sibling 0) ((parent-is "init_declarator") parent-bol c-ts-mode-indent-offset) ((parent-is "parenthesized_expression") first-sibling 1) -- 2.34.1 --=-=-=--