aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2017-11-03 08:33:13 -0400
committerStefan Monnier2017-11-03 08:33:13 -0400
commitcaa63cc96cfd2d21872eba17a474b4535178ad58 (patch)
treed0b801b48be0162b3bf081e67915a3ef781a8376
parent9f4f130b793e3a6ef7abef99e3e892271128e4b2 (diff)
downloademacs-caa63cc96cfd2d21872eba17a474b4535178ad58.tar.gz
emacs-caa63cc96cfd2d21872eba17a474b4535178ad58.zip
* lisp/progmodes/flymake.el (flymake-start): Fix dead buffer case
Don't try to flymake-start within a buffer that doesn't exist any more.
-rw-r--r--lisp/progmodes/flymake.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 1048bc50655..c2349d8c7cc 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -601,8 +601,8 @@ not expected."
601 (null expected-token)) 601 (null expected-token))
602 ;; should never happen 602 ;; should never happen
603 (flymake-error "Unexpected report from stopped backend %s" backend)) 603 (flymake-error "Unexpected report from stopped backend %s" backend))
604 ((and (not (eq expected-token token)) 604 ((not (or (eq expected-token token)
605 (not force)) 605 force))
606 (flymake-error "Obsolete report from backend %s with explanation %s" 606 (flymake-error "Obsolete report from backend %s with explanation %s"
607 backend explanation)) 607 backend explanation))
608 ((eq :panic report-action) 608 ((eq :panic report-action)
@@ -742,8 +742,11 @@ Interactively, with a prefix arg, FORCE is t."
742 () 742 ()
743 (remove-hook 'post-command-hook #'start-post-command 743 (remove-hook 'post-command-hook #'start-post-command
744 nil) 744 nil)
745 (with-current-buffer buffer 745 ;; The buffer may have disappeared already, e.g. because of
746 (flymake-start (remove 'post-command deferred) force))) 746 ;; code like `(with-temp-buffer (python-mode) ...)'.
747 (when (buffer-live-p buffer)
748 (with-current-buffer buffer
749 (flymake-start (remove 'post-command deferred) force))))
747 (start-on-display 750 (start-on-display
748 () 751 ()
749 (remove-hook 'window-configuration-change-hook #'start-on-display 752 (remove-hook 'window-configuration-change-hook #'start-on-display