From cfdf8889bca78d1afacfe90fe311060abea705fa Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Sat, 18 Apr 2020 21:54:56 +0200
Subject: [PATCH] =?UTF-8?q?Cr=C3=A9e=20un=20fichier=20~/.clang-format=20au?=
 =?UTF-8?q?=20d=C3=A9marrage.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Ce fichier déactive clang-format globalement dans le home de
l'utilisateur.

C'est destiné aux utilisateurs qui n'utilisent pas clang-format. En
fait clang-format s'il ne trouve pas de .clang-format dans les
répertoires parents utilise une configuration par défaut plutôt que ne
rien faire ...
---
 init.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/init.el b/init.el
index fd1ec54..dbb0211 100644
--- a/init.el
+++ b/init.el
@@ -52,6 +52,18 @@
   (load-file "~/.emacs.d/.init-custom.el")
   (customize-save-customized))
 
+;;; Charge la configuration et éventuellement la sauve si le fichier
+;;; de customization n'existe pas
+(let ((home-dot-clang-format "~/.clang-format"))
+  (unless (file-exists-p home-dot-clang-format)
+    (with-temp-file home-dot-clang-format
+      (insert "---
+Language: Cpp
+DisableFormat: true
+SortIncludes: false
+---
+"))))
+
 ;;; Local Variables:
 ;;; byte-compile-warnings: (not free-vars)
 ;;; End: (provide 'init)
-- 
GitLab