From: Joe Perches <joe@perches.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
LKML <linux-kernel@vger.kernel.org>,
clang-built-linux <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang
Date: Wed, 14 Aug 2019 19:44:49 -0700 [thread overview]
Message-ID: <128728a0965240aa5b68970d7721d857176ae7cd.camel@perches.com> (raw)
In-Reply-To: <CANiq72m5=pqHaNi3P5VAMviaoX6yxT7OPg6sys1uMDki0g2bOw@mail.gmail.com>
On Tue, 2019-08-13 at 14:44 +0200, Miguel Ojeda wrote:
> Hm... I would go for either __fallthrough as the rest of attributes,
> or simply fallthrough -- FALLTHROUGH seems wrong. If you want it that
> way for visibility, then I would choose __fallthrough, since the
> underscores are quite prominent and anyway IDEs typically highlight
> macros in a different color than keywords (return etc.).
Just fyi:
I added this line to my .emacs and "fallthrough" is now
syntax highlighted like every other keyword.
(font-lock-add-keywords 'c-mode
'(("\\<\\(fallthrough\\)\\>" . font-lock-keyword-face)))
So now my linux-c-mode block is:
(defun linux-c-mode ()
"C mode with adjusted defaults for use with the Linux kernel."
(interactive)
(font-lock-add-keywords 'c-mode
'(("\\<\\(fallthrough\\)\\>" . font-lock-keyword-face)))
(c-mode)
(c-set-style "K&R")
(setq c-basic-offset 8)
(setq c-indent-level 8)
(setq c-brace-imaginary-offset 0)
(setq c-brace-offset -8)
(setq c-argdecl-indent 8)
(setq c-label-offset -8)
(setq c-continued-statement-offset 8)
(setq indent-tabs-mode t)
(setq tab-width 8)
(setq show-trailing-whitespace t)
)
I don't know to do that for vim nor any other ide,
but I trust someone will know and show how it's done.
next prev parent reply other threads:[~2019-08-15 2:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 22:11 [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang Joe Perches
2019-08-05 22:23 ` Nathan Chancellor
2019-08-10 19:32 ` Joe Perches
2019-08-10 19:44 ` Linus Torvalds
2019-08-10 20:18 ` Joe Perches
2019-08-10 20:33 ` Joe Perches
2019-08-16 19:58 ` rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang) Joe Perches
2019-08-19 23:24 ` rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT Stephen Rothwell
2019-08-20 0:08 ` Joe Perches
2019-08-20 23:28 ` Linus Torvalds
2019-08-20 23:37 ` Joe Perches
2019-08-21 0:39 ` Linus Torvalds
2019-08-26 8:58 ` Geert Uytterhoeven
2019-08-21 0:20 ` Joe Perches
2019-08-21 0:43 ` Linus Torvalds
2019-08-21 0:58 ` stracpy Joe Perches
2019-08-21 4:01 ` rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT Willy Tarreau
2019-08-21 0:33 ` Stephen Rothwell
2019-08-11 2:04 ` [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang Nathan Chancellor
2019-08-11 3:06 ` Joe Perches
2019-08-11 3:17 ` Nathan Chancellor
2019-08-11 3:54 ` Joe Perches
2019-08-12 5:07 ` Joe Perches
2019-08-11 6:50 ` Bernd Petrovitsch
2019-08-12 16:28 ` Nick Desaulniers
2019-08-12 17:42 ` Joe Perches
2019-08-13 12:44 ` Miguel Ojeda
2019-08-15 2:44 ` Joe Perches [this message]
2019-08-16 8:47 ` Joe Perches
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=128728a0965240aa5b68970d7721d857176ae7cd.camel@perches.com \
--to=joe@perches.com \
--cc=clang-built-linux@googlegroups.com \
--cc=gustavo@embeddedor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=torvalds@linux-foundation.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.
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 NNTP newsgroup(s).