From 5203b440d3edb17caf88aa9315a8525875f343b9 Mon Sep 17 00:00:00 2001 From: Calvin Beck Date: Wed, 31 Oct 2018 14:58:00 -0400 Subject: Ignore ephemeral buffers, and buffers not pointed at files. This helps with, for example, org-src-fontification buffers. https://lists.gnu.org/archive/html/emacs-orgmode/2016-03/msg00354.html --- coq/coq-compile-common.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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))))) -- cgit v1.2.3