aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-01-01 16:32:44 +0000
committerRichard M. Stallman1994-01-01 16:32:44 +0000
commit900162957bccf93008c8b4d70888eae056f208fa (patch)
tree8ecf66988da2991b60f7c59afaf783f8854cbd3a
parentfeea21d147f3710eda5a0fd66a2c4a7fb563cd49 (diff)
downloademacs-900162957bccf93008c8b4d70888eae056f208fa.tar.gz
emacs-900162957bccf93008c8b4d70888eae056f208fa.zip
(compilation-read-command, compilation-ask-about-save): New variables.
(compile): Obey them.
-rw-r--r--lisp/progmodes/compile.el19
1 files changed, 15 insertions, 4 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 565ebd1447e..5151ca9f710 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -159,6 +159,14 @@ Each element has the form (REGEXP FILE-IDX LINE-IDX).
159If REGEXP matches, the FILE-IDX'th subexpression gives the file 159If REGEXP matches, the FILE-IDX'th subexpression gives the file
160name, and the LINE-IDX'th subexpression gives the line number.") 160name, and the LINE-IDX'th subexpression gives the line number.")
161 161
162(defvar compilation-read-command t
163 "If not nil, M-x compile reads the compilation command to use.
164Otherwise, M-x compile just uses the value of `compile-command'.")
165
166(defvar compilation-ask-about-save t
167 "If not nil, M-x compile asks which buffers to save before compiling.
168Otherwise, it saves all modified buffers without asking.")
169
162(defvar grep-regexp-alist 170(defvar grep-regexp-alist
163 '(("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) 171 '(("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2))
164 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") 172 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.")
@@ -226,11 +234,14 @@ Then start the next one.
226The name used for the buffer is actually whatever is returned by 234The name used for the buffer is actually whatever is returned by
227the function in `compilation-buffer-name-function', so you can set that 235the function in `compilation-buffer-name-function', so you can set that
228to a function that generates a unique name." 236to a function that generates a unique name."
229 (interactive (list (read-from-minibuffer "Compile command: " 237 (interactive
230 compile-command nil nil 238 (if compilation-read-command
231 '(compile-history . 1)))) 239 (list (read-from-minibuffer "Compile command: "
240 compile-command nil nil
241 '(compile-history . 1)))
242 (list compile-command)))
232 (setq compile-command command) 243 (setq compile-command command)
233 (save-some-buffers nil nil) 244 (save-some-buffers (not compilation-ask-about-save) nil)
234 (compile-internal compile-command "No more errors")) 245 (compile-internal compile-command "No more errors"))
235 246
236;;;###autoload 247;;;###autoload