From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: CC Mode lambda function help Date: Fri, 25 Sep 2020 23:05:42 +0200 Message-ID: <87h7rlr2hl.fsf@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31968"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 25 23:06:30 2020 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 1kLuvF-0008Ec-L2 for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Sep 2020 23:06:29 +0200 Original-Received: from localhost ([::1]:35154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLuvE-0006BP-M5 for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Sep 2020 17:06:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLuuY-0005ic-6L for emacs-devel@gnu.org; Fri, 25 Sep 2020 17:05:46 -0400 Original-Received: from out0.migadu.com ([94.23.1.103]:29276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLuuV-0000Cq-3l for emacs-devel@gnu.org; Fri, 25 Sep 2020 17:05:45 -0400 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=1601067938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=At7rXsOuP63dTWvpnrqmSzCnEdAUNxg7H73HM9gbfsY=; b=dOjPXVyVgH9c+lIfYa/IHYtSedFVtwsJAYUXSII6KQtxDBNhBA3PWhF8LGQmhosMBQ+joY vw5PeQt6FaLZviySLabfYuTKKc2++r8hJJF9ROhpnWIU4aPpeiqkj27/gqglXq5G9SSWag TEUKMiSRKotaXQb/xY1mwTJhIkK0qgaNekctjWH6oniB67EcxVMdHUUpRZQX2pI3p2zFIK /RM0N3tnqKhQgtpsMBHdeHfAVAXaHYheURQ8BKKNMIehLZXgw/2KVDlNFIotgbmIH7TABD qomogrmVf0Ef/PDxp1QZNri34XB76o9WkiX8iy0H0C+YxuGqgFpQFXrJi7M1Jg== Received-SPF: pass client-ip=94.23.1.103; envelope-from=theo@thornhill.no; helo=out0.migadu.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/25 17:05:38 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:256438 Archived-At: Hello! I am reworking the csharp mode found at https://github.com/josteink/csharp-mode, and I have some problems I am really struggling to fix, or find information about in the manual (if it is there): 1. Lambda functions Consider this code: ``` AsyncTest.Run(async () => { Something xyz = new SomethingMore(); }); ``` Right now this indents as: ``` AsyncTest.Run(async () => { Something xyz = new SomethingMore(); }); ``` I cannot find what c-lang-defconst to configure, or what c-style-alist combination to pick to get this. Any pointer to what is wrong would be super helpful. 2. Attributes Consider this code: ``` [DllImport("something.dll")] public extern int GetSomething(); ``` Gets indented as: ``` [DllImport("something.dll")] public extern int GetSomething(); ``` This I attribute (pun intended) to vsemi, since when one is added: ``` [DllImport("something.dll")]; // <-- notice this public extern int GetSomething(); ``` It behaves correctly. In addition, that semi fixes fontification for the method name. I would like not to use the 'statement-cont', since that only looks like a symptom, rather than a fix. I'd love some pointers to how I would best handle this. To reproduce this, you have to (unfortunately...) clone the abovementioned repo, checkout the 'rework' branch, then byte compile that file. I am sorry there is no quicker way to get to that code. These snippets should be enough to illustrate my issues. Have a lovely day, Theodor Thornhill