From f20fa61eb4c323eb1642c69c236b3d9a1f8b2cdb Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 2 Apr 2022 17:13:36 -0400 Subject: Add .clang-format and .dir-locals.el files to set coding style Configure emacs and clang-format 15 to the coding style I am choosing for qpdf. --- .dir-locals.el | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .dir-locals.el (limited to '.dir-locals.el') diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 00000000..d3c0b626 --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,38 @@ +((nil . ((indent-tabs-mode . t) + (qpdf-cc-style + . + ("qpdf" + (c-basic-offset . 4) + (c-comment-only-line-offset . 0) + (c-offsets-alist + (defun-block-intro . +) + (block-open . 0) + (substatement-open . 0) + (statement-cont . +) + (case-label . 0) + (access-label . -2) + (statement-case-intro . +) + (statement-case-open . +) + (arglist-intro . +) + (arglist-close . 0) + (inline-open . 0) + (inlambda . 0) + ) + ) + ) + (c-noise-macro-names . ("QPDF_DLL" "QPDF_DLL_CLASS" "QPDF_DLL_LOCAL")) + ) + ) + (c++-mode . ((eval . (progn + (add-to-list 'c-style-alist qpdf-cc-style) + (c-set-style "qpdf") + ) + )) + ) + (c-mode . ((eval . (progn + (add-to-list 'c-style-alist qpdf-cc-style) + (c-set-style "qpdf") + ) + )) + ) +) -- cgit v1.2.3-54-g00ecf