935 |
(substitute-env-vars (match-string 1 command)) |
(substitute-env-vars (match-string 1 command)) |
936 |
"~") |
"~") |
937 |
default-directory)) |
default-directory)) |
938 |
|
(erase-buffer) |
939 |
;; Select the desired mode. |
;; Select the desired mode. |
940 |
(if (not (eq mode t)) |
(if (not (eq mode t)) |
941 |
(funcall mode) |
(funcall mode) |
945 |
(if highlight-regexp |
(if highlight-regexp |
946 |
(set (make-local-variable 'compilation-highlight-regexp) |
(set (make-local-variable 'compilation-highlight-regexp) |
947 |
highlight-regexp)) |
highlight-regexp)) |
|
(erase-buffer) |
|
948 |
;; Output a mode setter, for saving and later reloading this buffer. |
;; Output a mode setter, for saving and later reloading this buffer. |
949 |
(insert "-*- mode: " name-of-mode |
(insert "-*- mode: " name-of-mode |
950 |
"; default-directory: " (prin1-to-string default-directory) |
"; default-directory: " (prin1-to-string default-directory) |
951 |
" -*-\n" command "\n") (setq thisdir default-directory)) |
" -*-\n" command "\n") |
952 |
|
(setq thisdir default-directory)) |
953 |
(set-buffer-modified-p nil)) |
(set-buffer-modified-p nil)) |
954 |
;; If we're already in the compilation buffer, go to the end |
;; If we're already in the compilation buffer, go to the end |
955 |
;; of the buffer, so point will track the compilation output. |
;; of the buffer, so point will track the compilation output. |