summaryrefslogtreecommitdiff
path: root/lisp/cpp.el
diff options
context:
space:
mode:
authorMatt Kosarek <matt.kosarek@canonical.com>2025-12-09 08:35:18 -0500
committerMatt Kosarek <matt.kosarek@canonical.com>2025-12-09 08:35:18 -0500
commit7e8154339c89594aa0fb6f77f41025d8e62bda9f (patch)
tree48416cdb8c96f80bbd12890e7e7eadbfd60d3265 /lisp/cpp.el
parenta1e93569af7e744076a5253dbcdf3f4ed96196c2 (diff)
Fix cpp errorsHEADmaster
Diffstat (limited to 'lisp/cpp.el')
-rw-r--r--lisp/cpp.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/cpp.el b/lisp/cpp.el
index d6b1cad..d1255d7 100644
--- a/lisp/cpp.el
+++ b/lisp/cpp.el
@@ -35,7 +35,7 @@
(if (string= (buffer-file-name) "CMakeLists.txt")
(mk/cpp/generate-compile-commands-cmake)))
-(defun mk/clang-format-buffer-if-project-file ()
+(defun mk/cpp/clang-format-buffer-if-project-file ()
"Run clang-format-buffer only if a .clang-format exists in the Projectile project."
(when (and (projectile-project-p) ; inside a projectile project
(locate-dominating-file (buffer-file-name) ".clang-format"))
@@ -45,10 +45,10 @@
(add-hook 'c-mode-common-hook
(lambda ()
(add-hook 'before-save-hook
- #'mk/clang-format-buffer-if-project-file
+ #'mk/cpp/clang-format-buffer-if-project-file
nil 'local)))
-(add-hook 'after-save-hook 'maybe-regenerate-compile-commands)
+(add-hook 'after-save-hook 'mk/cpp/maybe-regenerate-compile-commands)
(provide 'cpp)
;;; cpp.el ends here