summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2017-10-20 00:50:34 +0100
committerJoão Távora <joaotavora@gmail.com>2017-10-20 00:50:34 +0100
commit234b1e3864b8b940f72f3727fe7087cf7e90b43d (patch)
tree4b0e1ce6747f64f517700aaa334cddf21364e410 /lisp
parent3ea6a4d4baf67ae88dc8041c6247e9f0e3cd1eab (diff)
downloademacs-234b1e3864b8b940f72f3727fe7087cf7e90b43d.tar.gz
emacs-234b1e3864b8b940f72f3727fe7087cf7e90b43d.tar.bz2
emacs-234b1e3864b8b940f72f3727fe7087cf7e90b43d.zip
Flymake backends must check proc obsoleteness in source buffer
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/elisp-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 99a4841e318..41415943a58 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -1693,7 +1693,8 @@ current buffer state and calls REPORT-FN when done."
(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