From 2c924d5cb233e64b718e793b62b5c9cd45d87e3a Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sat, 14 Feb 2026 08:23:25 +0200 Subject: [PATCH] dir-locals: add compile-command (commented-out) Add example of setting up compile-command; but comment out by default to avoid warnings loaded. --- .dir-locals.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.dir-locals.el b/.dir-locals.el index 997a80ed..a963011f 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -3,7 +3,15 @@ (fill-column . 80) ;; (commment-fill-column . 80) (emacs-lisp-docstring-fill-column . 65) - (bug-reference-url-format . "https://github.com/djcb/mu/issues/%s"))) + (bug-reference-url-format . "https://github.com/djcb/mu/issues/%s") + ;; uncomment below (or put in .dir-locals-2.el) + ;; to dtrt for M-x compile + ;; + ;; (eval . (setq compile-command + ;; (format "make -C %s" + ;; (shell-quote-argument + ;; (locate-dominating-file "." "Makefile"))))) + )) (c-mode . ((c-file-style . "linux") (indent-tabs-mode . t) (mode . bug-reference-prog)))