[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/flymake-refactor 50a6920 04/18: Make flymake-tests
From: |
Jo�o T�vora |
Subject: |
[Emacs-diffs] scratch/flymake-refactor 50a6920 04/18: Make flymake-tests.el friendlier to interactive runs |
Date: |
Thu, 21 Sep 2017 20:35:24 -0400 (EDT) |
branch: scratch/flymake-refactor
commit 50a69202859245c76929731b496daf8040d61ba1
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Make flymake-tests.el friendlier to interactive runs
* test/lisp/progmodes/flymake-tests.el
(flymake-tests--current-face): Don't kill file buffers already
being visited before the test starts.
---
test/lisp/progmodes/flymake-tests.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/test/lisp/progmodes/flymake-tests.el
b/test/lisp/progmodes/flymake-tests.el
index 27338d1..16c422d 100644
--- a/test/lisp/progmodes/flymake-tests.el
+++ b/test/lisp/progmodes/flymake-tests.el
@@ -36,10 +36,11 @@
;; Warning predicate
(defun flymake-tests--current-face (file predicate)
- (let ((buffer (find-file-noselect
- (expand-file-name file flymake-tests-data-directory)))
- (process-environment (cons "LC_ALL=C" process-environment))
- (i 0))
+ (let* ((file (expand-file-name file flymake-tests-data-directory))
+ (visiting (find-buffer-visiting file))
+ (buffer (or visiting (find-file-noselect file)))
+ (process-environment (cons "LC_ALL=C" process-environment))
+ (i 0))
(unwind-protect
(with-current-buffer buffer
(setq-local flymake-proc-warning-predicate predicate)
@@ -59,7 +60,9 @@
(sleep-for (+ 0.5 flymake-no-changes-timeout)))
(flymake-goto-next-error)
(face-at-point))
- (and buffer (let (kill-buffer-query-functions) (kill-buffer buffer))))))
+ (and buffer
+ (not visiting)
+ (let (kill-buffer-query-functions) (kill-buffer buffer))))))
(ert-deftest warning-predicate-rx-gcc ()
"Test GCC warning via regexp predicate."
- [Emacs-diffs] scratch/flymake-refactor updated (fea31e2 -> 7140018), Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 50a6920 04/18: Make flymake-tests.el friendlier to interactive runs,
Jo�o T�vora <=
- [Emacs-diffs] scratch/flymake-refactor 2693054 07/18: Flymake faces are not just for "lines" anymore, Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 991c88f 11/18: flymake-warning face easier to distinguish from flymake-error, Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 7140018 18/18: Protect flymake-ui against commands like fill-paragraph, Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 593d4303 16/18: Add a new flymake test for multiple errors and warnings, Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 46e0721 01/18: Fix test failure introduced by previous commit, Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 46b4391 09/18: flymake-proc.el parses column numbers from gcc/javac errors, Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 205c444 03/18: Use non-obsolete variable names in flymake-tests.el, Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor f3b8a72 13/18: Refactor flymake-tests.el in preparation for more tests, Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor bac7512 05/18: New flymake-diagnostic-types-alist and more cleanup, Jo�o T�vora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor d3168cf 02/18: Make lisp/progmodes/flymake-ui.el some 150 lines lighter, Jo�o T�vora, 2017/09/21