]> git.eshelyaron.com Git - emacs.git/commitdiff
(elisp-flymake-byte-compile): Handle killed buffer in sentinel
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 22 Dec 2017 21:00:07 +0000 (16:00 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 22 Dec 2017 21:37:12 +0000 (16:37 -0500)
* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile):
Don't burp if the source-buffer has been killed.

lisp/progmodes/elisp-mode.el

index 4207edb8af5440f9e0643d60df7a0fe58e61e79f..c3e73767f90c368a60e7d4b09d997a1d4b20b03c 100644 (file)
@@ -1699,9 +1699,11 @@ current buffer state and calls REPORT-FN when done."
           (when (eq (process-status proc) 'exit)
             (unwind-protect
                 (cond
-                 ((not (eq proc (with-current-buffer source-buffer
-                                  elisp-flymake--byte-compile-process)))
-                  (flymake-log :warning "byte-compile process %s obsolete" proc))
+                 ((not (and (buffer-live-p source-buffer)
+                            (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
                                                     source-buffer