From 2a8a3db92da90f7caf82285913ac384a62e11638 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Fri, 1 Dec 2023 16:03:25 +0100 Subject: Smart compilation function. --- smart-documents.org | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/smart-documents.org b/smart-documents.org index 1d58598..01f2ccf 100644 --- a/smart-documents.org +++ b/smart-documents.org @@ -1812,6 +1812,24 @@ PDF. The binding is defined in Section [[Export to PDF]]. (save-buffers-kill-terminal))) #+END_SRC +** Programming + +*** Smart compilation + +#+BEGIN_SRC emacs-lisp :tangle yes + (defun sd-smart-compilation + () + "recompile if `compile-command` was modified, or prompt + for `compile-command`." + (interactive) + (if + (eq + (default-value 'compile-command) + compile-command) + (recompile) + (compile))) +#+END_SRC + * Editing preferences -- cgit v1.2.3