summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/flymake-proc.el72
1 files changed, 36 insertions, 36 deletions
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index c5bb79fee66..4792a945308 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -772,43 +772,43 @@ can also be executed interactively independently of
(flymake-proc--clear-buildfile-cache)
(flymake-proc--clear-project-include-dirs-cache)
- (let* ((cleanup-f (flymake-proc--get-cleanup-function buffer-file-name))
- (cmd-and-args (funcall init-f))
- (cmd (nth 0 cmd-and-args))
- (args (nth 1 cmd-and-args))
- (dir (nth 2 cmd-and-args))
- (success nil))
+ (let ((cleanup-f (flymake-proc--get-cleanup-function buffer-file-name))
+ (success nil))
(unwind-protect
- (cond
- ((not cmd-and-args)
- (flymake-log 1 "init function %s for %s failed, cleaning up"
- init-f buffer-file-name))
- (t
- (setq proc
- (let ((default-directory (or dir default-directory)))
- (when dir
- (flymake-log 3 "starting process on dir %s" dir))
- (make-process
- :name "flymake-proc"
- :buffer (current-buffer)
- :command (cons cmd args)
- :noquery t
- :filter
- (lambda (proc string)
- (let ((flymake-proc--report-fn report-fn))
- (flymake-proc--process-filter proc string)))
- :sentinel
- (lambda (proc event)
- (let ((flymake-proc--report-fn report-fn))
- (flymake-proc--process-sentinel proc event))))))
- (process-put proc 'flymake-proc--output-buffer
- (generate-new-buffer
- (format " *flymake output for %s*" (current-buffer))))
- (setq flymake-proc--current-process proc)
- (flymake-log 2 "started process %d, command=%s, dir=%s"
- (process-id proc) (process-command proc)
- default-directory)
- (setq success t)))
+ (let* ((cmd-and-args (funcall init-f))
+ (cmd (nth 0 cmd-and-args))
+ (args (nth 1 cmd-and-args))
+ (dir (nth 2 cmd-and-args)))
+ (cond
+ ((not cmd-and-args)
+ (flymake-log 1 "init function %s for %s failed, cleaning up"
+ init-f buffer-file-name))
+ (t
+ (setq proc
+ (let ((default-directory (or dir default-directory)))
+ (when dir
+ (flymake-log 3 "starting process on dir %s" dir))
+ (make-process
+ :name "flymake-proc"
+ :buffer (current-buffer)
+ :command (cons cmd args)
+ :noquery t
+ :filter
+ (lambda (proc string)
+ (let ((flymake-proc--report-fn report-fn))
+ (flymake-proc--process-filter proc string)))
+ :sentinel
+ (lambda (proc event)
+ (let ((flymake-proc--report-fn report-fn))
+ (flymake-proc--process-sentinel proc event))))))
+ (process-put proc 'flymake-proc--output-buffer
+ (generate-new-buffer
+ (format " *flymake output for %s*" (current-buffer))))
+ (setq flymake-proc--current-process proc)
+ (flymake-log 2 "started process %d, command=%s, dir=%s"
+ (process-id proc) (process-command proc)
+ default-directory)
+ (setq success t))))
(unless success
(funcall cleanup-f))))))))