all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Add configuration for clang-format.
@ 2017-09-19  8:49 Philipp Stephani
  2017-09-24  8:48 ` Philipp Stephani
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Stephani @ 2017-09-19  8:49 UTC (permalink / raw)
  To: emacs-devel; +Cc: Philipp Stephani

This allows developers to auto-format the C code with clang-format.
It’s not 100% accurate, but works pretty well for most of the C code.
---
 .clang-format | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 .clang-format

diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000000..7895ada36d
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,27 @@
+Language: Cpp
+BasedOnStyle: LLVM
+AlignEscapedNewlinesLeft: true
+AlwaysBreakAfterReturnType: TopLevelDefinitions
+BreakBeforeBinaryOperators: All
+BreakBeforeBraces: GNU
+ColumnLimit: 80
+ContinuationIndentWidth: 2
+ForEachMacros: [FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE]
+IncludeCategories:
+  - Regex: '^<config\.h>$'
+    Priority: -1
+  - Regex: '^<'
+    Priority: 1
+  - Regex: '^"lisp\.h"$'
+    Priority: 2
+  - Regex: '.*'
+    Priority: 3
+KeepEmptyLinesAtTheStartOfBlocks: false
+MaxEmptyLinesToKeep: 1
+PenaltyBreakBeforeFirstCallParameter: 2000
+SpaceAfterCStyleCast: true
+SpaceBeforeParens: Always
+
+# Local Variables:
+# mode: yaml
+# End:
-- 
2.14.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add configuration for clang-format.
  2017-09-19  8:49 [PATCH] Add configuration for clang-format Philipp Stephani
@ 2017-09-24  8:48 ` Philipp Stephani
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Stephani @ 2017-09-24  8:48 UTC (permalink / raw)
  To: emacs-devel; +Cc: Philipp Stephani

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

Philipp Stephani <p.stephani2@gmail.com> schrieb am Di., 19. Sep. 2017 um
10:49 Uhr:

> This allows developers to auto-format the C code with clang-format.
> It’s not 100% accurate, but works pretty well for most of the C code.
>

Pushed to master as 108df97bf7. Note that this doesn't change the behavior
of Emacs in any way; only existing users of clang-format get better support
out of the box.

[-- Attachment #2: Type: text/html, Size: 696 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-24  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-19  8:49 [PATCH] Add configuration for clang-format Philipp Stephani
2017-09-24  8:48 ` Philipp Stephani

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.