all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mohammed Sadiq <sadiq@sadiqpk.org>
To: Yuan Fu <casouri@gmail.com>
Cc: 60496@debbugs.gnu.org
Subject: bug#60496: 29.0.60; c-ts-mode: Broken indentation with linux style conditionals
Date: Tue, 03 Jan 2023 14:39:52 +0530	[thread overview]
Message-ID: <1d37d77b75e3ede545e68c9521fcb171@sadiqpk.org> (raw)
In-Reply-To: <68A07E57-06EE-4F38-A2BC-A426B85BE56A@gmail.com>

On 2023-01-03 03:59, Yuan Fu wrote:
> Mohammed Sadiq <sadiq@sadiqpk.org> writes:
> 
>> Indentation of the following C code with linux style is broken:
>> 
>> int main (void)
>> {
>>   if (a) {
>>     func_a ();
>>   } else if (b) {
>> 	   func_b ();
>> 	 } else {
>> 	   func_c ();
>> 	 }
>> }
>> 
> 
> Thanks. I’m not familiar with the linux style, is the problem with the
> closing brackets? Could you give me a correct example so I know exactly
> what’s wrong?
> 
> Yuan


The expected indentation style for the given code (this one is provided
by c-mode), with the default indentation values:

int
main (void)
{
   if (a) {
     func_a ();
   } else if (b) {
     func_b ();
   } else {
     func_c ();
   }
}





  reply	other threads:[~2023-01-03  9:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-02 15:57 bug#60496: 29.0.60; c-ts-mode: Broken indentation with linux style conditionals Mohammed Sadiq
2023-01-02 22:29 ` Yuan Fu
2023-01-03  9:09   ` Mohammed Sadiq [this message]
2023-01-07 12:18     ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-15  9:23 ` Yuan Fu

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=1d37d77b75e3ede545e68c9521fcb171@sadiqpk.org \
    --to=sadiq@sadiqpk.org \
    --cc=60496@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    /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.