[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 234b1e3: Flymake backends must check proc obsolet
From: |
João Távora |
Subject: |
[Emacs-diffs] emacs-26 234b1e3: Flymake backends must check proc obsoleteness in source buffer |
Date: |
Thu, 19 Oct 2017 19:54:30 -0400 (EDT) |
branch: emacs-26
commit 234b1e3864b8b940f72f3727fe7087cf7e90b43d
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
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.
---
doc/misc/flymake.texi | 2 +-
lisp/progmodes/elisp-mode.el | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 99ab127..2aabaf0 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -600,7 +600,7 @@ Binding,,, elisp, The Emacs Lisp Reference Manual}) to be
active.
;; `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
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 99a4841..4141594 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 234b1e3: Flymake backends must check proc obsoleteness in source buffer,
João Távora <=