From: Jen-Chieh Shen <jcs090218@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 63141@debbugs.gnu.org, jostein@kjonigsen.net,
Theodor Thornhill <theo@thornhill.no>
Subject: bug#63141: Incorrect indentation in csharp-mode
Date: Sat, 29 Apr 2023 04:00:59 -0700 [thread overview]
Message-ID: <CAMiGhTP2xjVyT9rQH8hF4i2FF=JVBjt3GJgWOUMRb835mHr=kQ@mail.gmail.com> (raw)
In-Reply-To: <83ttwzotex.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2444 bytes --]
> The patch I can envision is to change the default c-offsets-alist.
But IMO we should only do that if many/most C# programs use the style
suggested by the OP.
Just want to mention, the style conflicts with Visual Studio IDE (probably
VSCode too), and Microsoft creates C#. It's probably a good idea to match
with these tool.
I don't know what’s the prefer C# style guides in the old days, but I’ve
been using C# 8+ years and I know it has always been this way (the one with
expected behavior).
LMKWYT?
On Sat, Apr 29, 2023 at 3:48 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Sat, 29 Apr 2023 12:40:30 +0200
> > From: Theodor Thornhill <theo@thornhill.no>
> > CC: 63141@debbugs.gnu.org, jostein@kjonigsen.net
> >
> > >> (c-add-style "csharp"
> > >> '("java"
> > >> (c-basic-offset . 4)
> > >> (c-comment-only-line-offset . (0 . 0))
> > >> (c-offsets-alist . ((inline-open . 0)
> > >> (arglist-intro . +)
> > >> (arglist-close . 0)
> > >> (inexpr-class . 0)
> > >> (case-label . +)
> > >> (cpp-macro .
> c-lineup-dont-change)
> > >> (substatement-open . 0)))))
> > >> ```
> > >>
> > >> I consider it an awkward indentation, so better to change the default
> (change to the expected
> > >> behavior).
> > >
> > >I'll let Theo and Jostein chime in regarding the accepted practices in
> > >C#, but in general it is not enough to hear from one or several users
> > >that they don't like the defaults in order for us to change the
> > >default behavior. These customization options exist precisely so that
> > >people who don't like the defaults could easily adjust Emacs to their
> > >liking. Why would you impose your personal preferences on everyone
> > >else, instead of letting them customize this as they see fit?
> >
> > I agree. It's not a bug, but could absolutely be a missing
> feature/consideration. I'd be happy to review a patch with the proposed
> changes, though.
>
> The patch I can envision is to change the default c-offsets-alist.
> But IMO we should only do that if many/most C# programs use the style
> suggested by the OP.
>
[-- Attachment #2: Type: text/html, Size: 5570 bytes --]
next prev parent reply other threads:[~2023-04-29 11:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 7:25 bug#63141: Incorrect indentation in csharp-mode Jen-Chieh Shen
2023-04-28 7:44 ` Eli Zaretskii
2023-04-28 8:50 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-28 10:00 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-28 10:29 ` Eli Zaretskii
2023-04-28 11:58 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-28 12:02 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-28 19:26 ` Jen-Chieh Shen
2023-04-29 5:46 ` Eli Zaretskii
2023-04-29 5:54 ` Jen-Chieh Shen
2023-04-29 6:16 ` Eli Zaretskii
2023-04-29 10:40 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-29 10:48 ` Eli Zaretskii
2023-04-29 11:00 ` Jen-Chieh Shen [this message]
2023-04-29 11:54 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-29 11:59 ` Jen-Chieh Shen
2023-04-29 11:02 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-02 12:57 ` Eli Zaretskii
2023-05-03 4:44 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-06 8:50 ` Eli Zaretskii
2023-05-06 10:03 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-06 11:00 ` Jen-Chieh Shen
2023-05-06 11:08 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-06 11:09 ` Jen-Chieh Shen
2023-05-06 12:05 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-06 19:05 ` Jen-Chieh Shen
2023-05-06 19:16 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-06 19:40 ` Eli Zaretskii
2023-05-08 8:03 ` Jen-Chieh Shen
2023-05-08 12:08 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-09 9:22 ` Jen-Chieh Shen
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='CAMiGhTP2xjVyT9rQH8hF4i2FF=JVBjt3GJgWOUMRb835mHr=kQ@mail.gmail.com' \
--to=jcs090218@gmail.com \
--cc=63141@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jostein@kjonigsen.net \
--cc=theo@thornhill.no \
/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).