Emacs: Load clang-format when my/clang-format-buffer-maybe is called.

This commit is contained in:
tastytea 2020-10-30 16:41:47 +01:00
parent d0d079e0e4
commit 50e1f5bb49
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
;;; c++.el --- C++ settings. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-10-27T09:46:38+0100>
;; Time-stamp: <2020-10-30T16:40:55+0100>
;;; Commentary:
@ -118,7 +118,7 @@
(when (executable-find "clang-format")
(use-package clang-format
:commands (clang-format-buffer)
:commands (clang-format-buffer my/clang-format-buffer-maybe)
:config (defun my/clang-format-buffer-maybe ()
"Run `clang-format-buffer' if `my/reformat-save' is t."
(when my/reformat-save