summaryrefslogtreecommitdiff
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r--lisp/progmodes/compile.el33
1 files changed, 14 insertions, 19 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 0c57e6f55b1..ceb9a7b924d 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -12,7 +12,7 @@
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
@@ -167,6 +167,10 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
"^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):[0-9]+:[0-9]+:\\)?\
\\( warning\\)?" 1 2 3 (4))
+ (maven
+ ;; Maven is a popular build tool for Java. Maven is Free Software.
+ "\\(.*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\]" 1 2 3)
+
(bash
"^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2)
@@ -1101,8 +1105,7 @@ Returns the compilation buffer created."
(unless (getenv "EMACS")
(list "EMACS=t"))
(list "INSIDE_EMACS=t")
- (copy-sequence process-environment)))
- (start-process (symbol-function 'start-process)))
+ (copy-sequence process-environment))))
(set (make-local-variable 'compilation-arguments)
(list command mode name-function highlight-regexp))
(set (make-local-variable 'revert-buffer-function)
@@ -1123,22 +1126,14 @@ Returns the compilation buffer created."
;; comint uses `start-file-process'.
(get-buffer-process
(with-no-warnings
- (comint-exec outbuf (downcase mode-name)
- shell-file-name nil `("-c" ,command))))
- ;; Redefine temporarily `start-process' in order to
- ;; handle remote compilation.
- (fset 'start-process
- (lambda (name buffer program &rest program-args)
- (apply
- (if (file-remote-p default-directory)
- 'start-file-process
- start-process)
- name buffer program program-args)))
- (unwind-protect
- (start-process-shell-command (downcase mode-name)
- outbuf command)
- ;; Unwindform: Reset original definition of `start-process'.
- (fset 'start-process start-process)))))
+ (comint-exec
+ outbuf (downcase mode-name)
+ (if (file-remote-p default-directory)
+ "/bin/sh"
+ shell-file-name)
+ `("-c" ,command))))
+ (start-file-process-shell-command (downcase mode-name)
+ outbuf command))))
;; Make the buffer's mode line show process state.
(setq mode-line-process '(":%s"))
(set-process-sentinel proc 'compilation-sentinel)