all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* CC Mode lambda function help
@ 2020-09-25 21:05 Theodor Thornhill
  2020-10-09 10:57 ` Alan Mackenzie
  0 siblings, 1 reply; 3+ messages in thread
From: Theodor Thornhill @ 2020-09-25 21:05 UTC (permalink / raw)
  To: emacs-devel


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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-09 12:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-25 21:05 CC Mode lambda function help Theodor Thornhill
2020-10-09 10:57 ` Alan Mackenzie
2020-10-09 12:43   ` Theodor Thornhill

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.