chiark / gitweb /
Merge old CVS `ian-dotfiles' repo, as a subtree where we can pick bits
[ian-dotfiles.git] / from-cvs / files / emacs_quicker-compile.el
diff --git a/from-cvs/files/emacs_quicker-compile.el b/from-cvs/files/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))