Flymake backends that rely on sentinels running asynchronously and
checking buffer-local variables that hold running processes should
check for obsoleteness in the correct buffers, otherwise a (harmless)
warning might be triggered.
* doc/misc/flymake.texi (An annotated example backend):
Check buffer-local proc in the current buffer.
* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile):
Check buffer-local proc in the current buffer.
;; `ruby--flymake-proc', which indicates that
;; `proc' is not an obsolete process.
;;
- (if (eq proc ruby--flymake-proc)
+ (if (with-current-buffer source (eq proc ruby--flymake-proc))
(with-current-buffer (process-buffer proc)
(goto-char (point-min))
;; Parse the output buffer for diagnostic's
(when (eq (process-status proc) 'exit)
(unwind-protect
(cond
- ((not (eq proc elisp-flymake--byte-compile-process))
+ ((not (eq proc (with-current-buffer source-buffer
+ elisp-flymake--byte-compile-process)))
(flymake-log :warning "byte-compile process %s obsolete" proc))
((zerop (process-exit-status proc))
(elisp-flymake--byte-compile-done report-fn