diff options
| author | Stefan Monnier | 2011-04-20 15:08:21 -0300 |
|---|---|---|
| committer | Stefan Monnier | 2011-04-20 15:08:21 -0300 |
| commit | c79a6f38ab49050faa0d33e57d0c606bd9ea0e1a (patch) | |
| tree | 849cbc1b5f769f3f2925f996287f1337b0f17ad7 | |
| parent | 024ff1707e4a301b21b9de14ab64a406b92dd19f (diff) | |
| download | emacs-c79a6f38ab49050faa0d33e57d0c606bd9ea0e1a.tar.gz emacs-c79a6f38ab49050faa0d33e57d0c606bd9ea0e1a.zip | |
* lisp/progmodes/flymake.el (flymake-start-syntax-check-process): Obey `dir'.
| -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 6e98a03dd24..64ca1027ca4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-04-20 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2011-04-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * progmodes/flymake.el (flymake-start-syntax-check-process): | ||
| 4 | Obey `dir'. Simplify. | ||
| 5 | |||
| 3 | * vc/vc.el (vc-version-ediff): Call ediff-vc-internal directly, since | 6 | * vc/vc.el (vc-version-ediff): Call ediff-vc-internal directly, since |
| 4 | we're in VC after all. | 7 | we're in VC after all. |
| 5 | 8 | ||
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 4461ec27456..16c099d0127 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'." | |||
| 1152 | 1152 | ||
| 1153 | (defun flymake-start-syntax-check-process (cmd args dir) | 1153 | (defun flymake-start-syntax-check-process (cmd args dir) |
| 1154 | "Start syntax check process." | 1154 | "Start syntax check process." |
| 1155 | (let* ((process nil)) | 1155 | (condition-case err |
| 1156 | (condition-case err | 1156 | (let* ((process |
| 1157 | (progn | 1157 | (let ((default-directory (or dir default-directory))) |
| 1158 | (when dir | 1158 | (when dir |
| 1159 | (let ((default-directory dir)) | 1159 | (flymake-log 3 "starting process on dir %s" dir)) |
| 1160 | (flymake-log 3 "starting process on dir %s" default-directory))) | 1160 | (apply 'start-file-process |
| 1161 | (setq process (apply 'start-file-process | 1161 | "flymake-proc" (current-buffer) cmd args)))) |
| 1162 | "flymake-proc" (current-buffer) cmd args)) | 1162 | (set-process-sentinel process 'flymake-process-sentinel) |
| 1163 | (set-process-sentinel process 'flymake-process-sentinel) | 1163 | (set-process-filter process 'flymake-process-filter) |
| 1164 | (set-process-filter process 'flymake-process-filter) | 1164 | (push process flymake-processes) |
| 1165 | (push process flymake-processes) | 1165 | |
| 1166 | 1166 | (setq flymake-is-running t) | |
| 1167 | (setq flymake-is-running t) | 1167 | (setq flymake-last-change-time nil) |
| 1168 | (setq flymake-last-change-time nil) | 1168 | (setq flymake-check-start-time (flymake-float-time)) |
| 1169 | (setq flymake-check-start-time (flymake-float-time)) | 1169 | |
| 1170 | 1170 | (flymake-report-status nil "*") | |
| 1171 | (flymake-report-status nil "*") | 1171 | (flymake-log 2 "started process %d, command=%s, dir=%s" |
| 1172 | (flymake-log 2 "started process %d, command=%s, dir=%s" | 1172 | (process-id process) (process-command process) |
| 1173 | (process-id process) (process-command process) | 1173 | default-directory) |
| 1174 | default-directory) | 1174 | process) |
| 1175 | process) | 1175 | (error |
| 1176 | (error | 1176 | (let* ((err-str (format "Failed to launch syntax check process '%s' with args %s: %s" |
| 1177 | (let* ((err-str (format "Failed to launch syntax check process '%s' with args %s: %s" | 1177 | cmd args (error-message-string err))) |
| 1178 | cmd args (error-message-string err))) | 1178 | (source-file-name buffer-file-name) |
| 1179 | (source-file-name buffer-file-name) | 1179 | (cleanup-f (flymake-get-cleanup-function source-file-name))) |
| 1180 | (cleanup-f (flymake-get-cleanup-function source-file-name))) | 1180 | (flymake-log 0 err-str) |
| 1181 | (flymake-log 0 err-str) | 1181 | (funcall cleanup-f) |
| 1182 | (funcall cleanup-f) | 1182 | (flymake-report-fatal-status "PROCERR" err-str))))) |
| 1183 | (flymake-report-fatal-status "PROCERR" err-str)))))) | ||
| 1184 | 1183 | ||
| 1185 | (defun flymake-kill-process (proc) | 1184 | (defun flymake-kill-process (proc) |
| 1186 | "Kill process PROC." | 1185 | "Kill process PROC." |