From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Missing features in c-ts-mode Date: Fri, 17 Feb 2023 10:42:16 +0200 Message-ID: <83lekw1y53.fsf@gnu.org> References: <83wn4iajyy.fsf@gnu.org> <87fsb67pfj.fsf@thornhill.no> <83lekyagwy.fsf@gnu.org> <87a61e7n5j.fsf@thornhill.no> <877cwi7mju.fsf@thornhill.no> <83bkluaevv.fsf@gnu.org> <871qmq7l9q.fsf@thornhill.no> <87ilg1qv71.fsf@thornhill.no> <20230217082935.waa7f473dmvbpg3d@Ergus> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31564"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no, casouri@gmail.com, emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 17 09:43:01 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pSwKa-00083q-J1 for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Feb 2023 09:43:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSwJw-00020u-Vi; Fri, 17 Feb 2023 03:42:21 -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 1pSwJu-00020i-LU for emacs-devel@gnu.org; Fri, 17 Feb 2023 03:42:18 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSwJt-0003Ig-D1; Fri, 17 Feb 2023 03:42:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RrwTgVl92y6FRlrz5+rtCrqJS3T4FjliXa2A290nT4o=; b=kwawXvpEGM2t 9mLpk/qFOL62BxtfIDncfJl2ZvoKSKw1ZsYisifXFjI85wei+Ovjqc9jVQfrHBq8mJhuTFwaCZaI/ 4uS6TzyQ7nnopO93TXnOUfZlA10P6xrtOhBMiswU9pf/DXZpRNUTSeYnZ8fx4nr0/ZsdyMFrADxys E4KM5ss0TmQMWuSbxPXnc0MVf5B+BT7gKTHRDyXSFXso5IQwVnZNFAKGFmfxP4p/NLi+CADKZ3NKg rm8wtlYBFzIcDbSOXuMoD7AnwmCEA6pDxNBPz58hhZe9JugqyXTj3OU/uY11L0Epwjqec015grbNf zenlxlOW9MF/y23vYkPP+A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSwJs-0006pr-Qy; Fri, 17 Feb 2023 03:42:17 -0500 In-Reply-To: <20230217082935.waa7f473dmvbpg3d@Ergus> (message from Ergus on Fri, 17 Feb 2023 09:29:35 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303457 Archived-At: > Date: Fri, 17 Feb 2023 09:29:35 +0100 > From: Ergus > Cc: Eli Zaretskii , casouri@gmail.com, emacs-devel@gnu.org > > Hi Theodor: > > Sorry to bother, but I have a question about commit: > > f1f571e Add electric indent for preproc directives > > c-mode had by default the [0] indentation for #preprocesor directives, > but there are some use cases where that behavior is not desired (i.e > #pragma). > > Actually there are even multi-line pragmas when using OpenMP > > int main() > { > #pragma parallel for first private(x) \ > shared(y) etc > for (...) { > .... > } > } > > In this case the pragma in column zero is very confusing. Alan added a > new mode (c-toggle-cpp-indent-to-body) which worked around this issue a > few years ago. I don't if it is possible to enable similar behavior with > your change? Is is? We could perhaps have a similar toggle in c-ts-mode. Theo, can you have a look? Btw, the fact that this is off by default IMO speaks volumes about the importance of the feature.