diff options
author | Stefan Monnier <[email protected]> | 2011-04-20 15:08:21 -0300 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2011-04-20 15:08:21 -0300 |
commit | c79a6f38ab49050faa0d33e57d0c606bd9ea0e1a (patch) | |
tree | 849cbc1b5f769f3f2925f996287f1337b0f17ad7 /lisp | |
parent | 024ff1707e4a301b21b9de14ab64a406b92dd19f (diff) |
* lisp/progmodes/flymake.el (flymake-start-syntax-check-process): Obey `dir'.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/progmodes/flymake.el | 57 |
2 files changed, 31 insertions, 29 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6e98a03dd2..64ca1027ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-04-20 Stefan Monnier <[email protected]> + * progmodes/flymake.el (flymake-start-syntax-check-process): + Obey `dir'. Simplify. + * vc/vc.el (vc-version-ediff): Call ediff-vc-internal directly, since we're in VC after all. diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 4461ec2745..16c099d012 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1152,35 +1152,34 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." (defun flymake-start-syntax-check-process (cmd args dir) "Start syntax check process." - (let* ((process nil)) - (condition-case err - (progn - (when dir - (let ((default-directory dir)) - (flymake-log 3 "starting process on dir %s" default-directory))) - (setq process (apply 'start-file-process - "flymake-proc" (current-buffer) cmd args)) - (set-process-sentinel process 'flymake-process-sentinel) - (set-process-filter process 'flymake-process-filter) - (push process flymake-processes) - - (setq flymake-is-running t) - (setq flymake-last-change-time nil) - (setq flymake-check-start-time (flymake-float-time)) - - (flymake-report-status nil "*") - (flymake-log 2 "started process %d, command=%s, dir=%s" - (process-id process) (process-command process) - default-directory) - process) - (error - (let* ((err-str (format "Failed to launch syntax check process '%s' with args %s: %s" - cmd args (error-message-string err))) - (source-file-name buffer-file-name) - (cleanup-f (flymake-get-cleanup-function source-file-name))) - (flymake-log 0 err-str) - (funcall cleanup-f) - (flymake-report-fatal-status "PROCERR" err-str)))))) + (condition-case err + (let* ((process + (let ((default-directory (or dir default-directory))) + (when dir + (flymake-log 3 "starting process on dir %s" dir)) + (apply 'start-file-process + "flymake-proc" (current-buffer) cmd args)))) + (set-process-sentinel process 'flymake-process-sentinel) + (set-process-filter process 'flymake-process-filter) + (push process flymake-processes) + + (setq flymake-is-running t) + (setq flymake-last-change-time nil) + (setq flymake-check-start-time (flymake-float-time)) + + (flymake-report-status nil "*") + (flymake-log 2 "started process %d, command=%s, dir=%s" + (process-id process) (process-command process) + default-directory) + process) + (error + (let* ((err-str (format "Failed to launch syntax check process '%s' with args %s: %s" + cmd args (error-message-string err))) + (source-file-name buffer-file-name) + (cleanup-f (flymake-get-cleanup-function source-file-name))) + (flymake-log 0 err-str) + (funcall cleanup-f) + (flymake-report-fatal-status "PROCERR" err-str))))) (defun flymake-kill-process (proc) "Kill process PROC." |