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.bugs Subject: bug#63141: Incorrect indentation in csharp-mode Date: Sat, 29 Apr 2023 13:48:54 +0300 Message-ID: <83ttwzotex.fsf@gnu.org> References: <83354ksb73.fsf@gnu.org> <875y9ge6gu.fsf@thornhill.no> <87zg6scomn.fsf@thornhill.no> <83y1mcqoyl.fsf@gnu.org> <87wn1wcj6s.fsf@thornhill.no> <87ttx0cj04.fsf@thornhill.no> <83jzxvqlz6.fsf@gnu.org> <83cz3nqkl5.fsf@gnu.org> <77880442-05AB-40CC-ABA5-DDC40AC4413A@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15141"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jcs090218@gmail.com, 63141@debbugs.gnu.org, jostein@kjonigsen.net To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 29 12:49:15 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 1psi8g-0003hy-6h for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Apr 2023 12:49:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psi8W-0006NW-3H; Sat, 29 Apr 2023 06:49:04 -0400 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 1psi8T-0006NN-W0 for bug-gnu-emacs@gnu.org; Sat, 29 Apr 2023 06:49:02 -0400 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 1psi8T-0001Pa-No for bug-gnu-emacs@gnu.org; Sat, 29 Apr 2023 06:49:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psi8T-0007n5-KS for bug-gnu-emacs@gnu.org; Sat, 29 Apr 2023 06:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Apr 2023 10:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63141 X-GNU-PR-Package: emacs Original-Received: via spool by 63141-submit@debbugs.gnu.org id=B63141.168276530629871 (code B ref 63141); Sat, 29 Apr 2023 10:49:01 +0000 Original-Received: (at 63141) by debbugs.gnu.org; 29 Apr 2023 10:48:26 +0000 Original-Received: from localhost ([127.0.0.1]:35303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psi7t-0007lj-PF for submit@debbugs.gnu.org; Sat, 29 Apr 2023 06:48:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psi7s-0007l2-Js for 63141@debbugs.gnu.org; Sat, 29 Apr 2023 06:48:24 -0400 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 1psi7n-0001Lq-9u; Sat, 29 Apr 2023 06:48:19 -0400 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=GRcyM3LMyRehBnxoWIcILY7dBHTuCYPtFg8c8QTjQIE=; b=YtRFii/02V/s xqJaZaN7xui5HHG3fkXqevBDWuMVBZnqXnqy4/8Wg7TQenzAFshl1XUVWv/PjeUAIH+4mnfz2HRQ9 OUI0xpKAjpHQ8MiF6d+L2eP4kRYgfLxgqbcS1X2OYWIbPWu4C9jseiqmmEQ8vUSYyzAB+PZYUZl2F ULHWRYvdlEom3+rvT7xnyetrBykWt7mIr/8TK0LC+NWc0X88VWzf/8WqeYJpsHO0aVfE0Aot3RxLS mXeCLV1m2DpW+Qqn1Z65W2nzldeUmETy+bogTbrR/UQ4HUSEPuXWWQZaRC0rUY9BaT49Fqp1rEZuQ eiWw7med8GNS02bwskzOGg==; 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 1psi7l-0004TD-Kt; Sat, 29 Apr 2023 06:48:18 -0400 In-Reply-To: <77880442-05AB-40CC-ABA5-DDC40AC4413A@thornhill.no> (message from Theodor Thornhill on Sat, 29 Apr 2023 12:40:30 +0200) 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:260810 Archived-At: > Date: Sat, 29 Apr 2023 12:40:30 +0200 > From: Theodor Thornhill > 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.