chiark / gitweb /
Import ~/emacs from zealot
[ian-dotfiles.git] / home / emacs / quicker-compile.el
diff --git a/home/emacs/quicker-compile.el b/home/emacs/quicker-compile.el
new file mode 100644 (file)
index 0000000..1163ac1
--- /dev/null
@@ -0,0 +1,12 @@
+; Fixup of compile so it doesn't ask unless you want it to.
+
+(require 'compile)
+(provide 'quicker-compile)
+
+(defun quicker-compile (prompt-for-command)
+  "Runs compile. Will prompt for the compile command only if given
+a prefix argument."
+  (interactive "P")
+  (if prompt-for-command
+      (setq compile-command (read-string "Compile command: " compile-command)))
+  (compile compile-command))