From: Matt Armstrong <matt@rfc20.org>
To: 59027@debbugs.gnu.org
Subject: bug#59027: [PATCH] clang-format configuration tweaks
Date: Fri, 04 Nov 2022 15:49:50 -0700 [thread overview]
Message-ID: <87r0yiwd0x.fsf@rfc20.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 92 bytes --]
Tags: patch
These two patches configure clang-format to format code more like Emacs
does.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Configure-clang-format-to-use-tabs.patch --]
[-- Type: text/x-diff, Size: 683 bytes --]
From ddcaa8130852a2a4bab91308809b835a5ed2f2c4 Mon Sep 17 00:00:00 2001
From: Matt Armstrong <matt@rfc20.org>
Date: Thu, 3 Nov 2022 14:34:03 -0700
Subject: [PATCH 1/6] Configure clang-format to use tabs
* .clang-format (UseTab): Set to "Always", to match
the (indent-tabs-mode . t) in .dir-locals.el
---
.clang-format | 1 +
1 file changed, 1 insertion(+)
diff --git a/.clang-format b/.clang-format
index ac9f95c88a8..8a8391c2e47 100644
--- a/.clang-format
+++ b/.clang-format
@@ -21,6 +21,7 @@ MaxEmptyLinesToKeep: 1
PenaltyBreakBeforeFirstCallParameter: 2000
SpaceAfterCStyleCast: true
SpaceBeforeParens: Always
+UseTab: Always
# Local Variables:
# mode: yaml
--
2.35.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-.clang-format-ForEachMacros-Add-FOR_EACH_LIVE_BUFFER.patch --]
[-- Type: text/x-diff, Size: 832 bytes --]
From ad11e3dfeeadb333515c99c6b5c89dec1cb701c0 Mon Sep 17 00:00:00 2001
From: Matt Armstrong <matt@rfc20.org>
Date: Fri, 4 Nov 2022 15:24:57 -0700
Subject: [PATCH 2/6] ; * .clang-format (ForEachMacros): Add
FOR_EACH_LIVE_BUFFER.
---
.clang-format | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.clang-format b/.clang-format
index 8a8391c2e47..464375bd418 100644
--- a/.clang-format
+++ b/.clang-format
@@ -6,7 +6,10 @@ BreakBeforeBinaryOperators: All
BreakBeforeBraces: GNU
ColumnLimit: 70
ContinuationIndentWidth: 2
-ForEachMacros: [FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE, ITREE_FOREACH]
+ForEachMacros: [FOR_EACH_TAIL,
+ FOR_EACH_TAIL_SAFE,
+ FOR_EACH_LIVE_BUFFER,
+ ITREE_FOREACH]
IncludeCategories:
- Regex: '^<config\.h>$'
Priority: -1
--
2.35.1
next reply other threads:[~2022-11-04 22:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 22:49 Matt Armstrong [this message]
2022-11-05 0:55 ` bug#59027: [PATCH] clang-format configuration tweaks Stefan Kangas
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=87r0yiwd0x.fsf@rfc20.org \
--to=matt@rfc20.org \
--cc=59027@debbugs.gnu.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 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).