aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--coq/coq-compile-common.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/coq/coq-compile-common.el b/coq/coq-compile-common.el
index 936ad923..97ea6ec6 100644
--- a/coq/coq-compile-common.el
+++ b/coq/coq-compile-common.el
@@ -678,9 +678,12 @@ from `coq-compile-save-some-buffers' to
See also `save-some-buffers'. Return t for buffers with major
mode 'coq-mode' different from
`coq-compile-buffer-with-current-require' and nil for all other
-buffers. The buffer to test must be current."
+buffers. We will also return nil if the buffer is ephemeral, or
+not backed by a file. The buffer to test must be current."
(and
(eq major-mode 'coq-mode)
+ (not (string-prefix-p " " (buffer-name)))
+ buffer-file-name
(not (eq coq-compile-buffer-with-current-require
(current-buffer)))))