all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Mohammed Sadiq <sadiq@sadiqpk.org>
Cc: 60543-done@debbugs.gnu.org
Subject: bug#60543: 29.0.60; c-ts-mode: Labels are not properly indented
Date: Sun, 8 Jan 2023 17:06:39 -0800	[thread overview]
Message-ID: <2F43D0CF-3FFC-4252-A5C7-D5EA352B3F4B@gmail.com> (raw)
In-Reply-To: <8150ae85ab6d07c6b76a9e06d19e70a3@sadiqpk.org>


Mohammed Sadiq <sadiq@sadiqpk.org> writes:

> On 2023-01-08 07:45, Yuan Fu wrote:
>> After reading the manual for GNU indent, I think Linux style asks for
>> indenting labels to column 1, not the GNU style. And c-ts-mode’s
>> current
>> GNU style indentation agrees with GNU indent.
>> So I only added a rule to indent labels to column 1 in Linux style.
>> Feel
>> free to correct me, of course.
>> Yuan
>
> As per
> https://www.kernel.org/doc/html/v6.0/process/coding-style.html#centralized-exiting-of-functions
> the label has no indent from the parent block
>
> And for GNU style, I couldn't find an example the style manual, nor in
> GNU hello.
> So I except c-ts-mode to have the same behavior as c-mode (even if
> it's wrong
> as per GNU indent,).
>
> In short, I expect c-ts-mode to behave the same as c-mode because
> that's what
> users often expect (ie, for those who uses GNU indent, their code will
> indent
> right regardless of how c-mode or c-ts-mode behave.  But for the users
> who
> migrate from c-mode - the anticipated user base of c-ts-mode - expects
> it to
> be no different from c-mode)

Thanks. You are completely right. Linux style indents to column 0, and
GNU style indents to column 1 in top-level function and base indent
level of the parent in nested blocks (which is ... interesting).

I changed it to indent like that.

Yuan





  parent reply	other threads:[~2023-01-09  1:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04  7:28 bug#60543: 29.0.60; c-ts-mode: Labels are not properly indented Mohammed Sadiq
2023-01-06  6:09 ` Yuan Fu
2023-01-08  2:15 ` Yuan Fu
2023-01-08  8:36   ` Mohammed Sadiq
2023-01-09  1:06 ` Yuan Fu [this message]
     [not found] ` <handler.60543.D60543.167322640910612.notifdone@debbugs.gnu.org>
2023-01-09  5:45   ` bug#60543: closed (Re: bug#60543: 29.0.60; c-ts-mode: Labels are not properly indented) Mohammed Sadiq

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2F43D0CF-3FFC-4252-A5C7-D5EA352B3F4B@gmail.com \
    --to=casouri@gmail.com \
    --cc=60543-done@debbugs.gnu.org \
    --cc=sadiq@sadiqpk.org \
    /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 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.