Mercurial > emacs
diff lisp/progmodes/compile.el @ 81801:2e8d5916d236
* comint.el (make-comint, make-comint-in-buffer)
(comint-exec-1): Replace `start-process' by `start-file-process'.
* progmodes/compile.el (compilation-start): Revert redefining
`start-process'.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Tue, 10 Jul 2007 19:52:11 +0000 |
parents | 15008ad392dc |
children | 8c1a05c2d668 |
line wrap: on
line diff
--- a/lisp/progmodes/compile.el Tue Jul 10 18:05:36 2007 +0000 +++ b/lisp/progmodes/compile.el Tue Jul 10 19:52:11 2007 +0000 @@ -1098,8 +1098,7 @@ (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) @@ -1114,39 +1113,26 @@ (if compilation-process-setup-function (funcall compilation-process-setup-function)) (compilation-set-window-height outwin) - ;; 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))) ;; Start the compilation. - (unwind-protect - (let ((proc (if (eq mode t) - (get-buffer-process - (with-no-warnings - (comint-exec outbuf (downcase mode-name) - shell-file-name nil - `("-c" ,command)))) - (start-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) - (set-process-filter proc 'compilation-filter) - (set-marker (process-mark proc) (point) outbuf) - (when compilation-disable-input - (condition-case nil - (process-send-eof proc) - ;; The process may have exited already. - (error nil))) - (setq compilation-in-progress - (cons proc compilation-in-progress))) - ;; Unwindform: Reset original definition of `start-process' - (fset 'start-process start-process))) + (let ((proc (if (eq mode t) + (get-buffer-process + (with-no-warnings + (comint-exec outbuf (downcase mode-name) + shell-file-name nil `("-c" ,command)))) + (start-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) + (set-process-filter proc 'compilation-filter) + (set-marker (process-mark proc) (point) outbuf) + (when compilation-disable-input + (condition-case nil + (process-send-eof proc) + ;; The process may have exited already. + (error nil))) + (setq compilation-in-progress + (cons proc compilation-in-progress)))) ;; Now finally cd to where the shell started make/grep/... (setq default-directory thisdir)) (if (buffer-local-value 'compilation-scroll-output outbuf)