diff options
author | Calvin Beck <hobbes@ualberta.ca> | 2018-10-31 14:58:00 -0400 |
---|---|---|
committer | Calvin Beck <hobbes@ualberta.ca> | 2018-11-01 09:47:46 -0400 |
commit | 5203b440d3edb17caf88aa9315a8525875f343b9 (patch) | |
tree | f57ac5c4d0e1a2027ded2c4dd8bd96ee34e103aa | |
parent | 798739255ec1002438b6f9250acac9786ca28554 (diff) |
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
-rw-r--r-- | coq/coq-compile-common.el | 5 |
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))))) |