[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/flymake-refactor 50a6920 11/52: Make flymake-tests
From: |
João Távora |
Subject: |
[Emacs-diffs] scratch/flymake-refactor 50a6920 11/52: Make flymake-tests.el friendlier to interactive runs |
Date: |
Sun, 1 Oct 2017 12:40:44 -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] branch scratch/flymake-refactor created (now 51a2b7b), João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor b30fb9c 03/52: Allow running flymake-tests.el from interactive sessions, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor e7e9d4f 01/52: Fix flymake-backends defcustom's docstring and usage, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 3b06b52 02/52: Adjust flymake's UI/backend split started in earlier commit, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor dc39d65 04/52: flymake-ui.el provides new flymake-report as a re-entry point for backends., João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 46e0721 08/52: Fix test failure introduced by previous commit, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 205c444 10/52: Use non-obsolete variable names in flymake-tests.el, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 50a6920 11/52: Make flymake-tests.el friendlier to interactive runs,
João Távora <=
- [Emacs-diffs] scratch/flymake-refactor 46b4391 16/52: flymake-proc.el parses column numbers from gcc/javac errors, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 4292342 13/52: Further simplify progmodes/flymake-ui.el, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor c5cc7e9 17/52: Make debugging flymake-proc.el easier, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 2693054 14/52: Flymake faces are not just for "lines" anymore, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 991c88f 18/52: flymake-warning face easier to distinguish from flymake-error, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 12aa247 19/52: Protect against timer triggers when no flymake-mode, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 740572e 05/52: Completely rewrite flymake's subprocess output processing, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 14db516 22/52: flymake-ui.el checks file names before considering diagnostics, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 61ba20b 21/52: Echo flymake error messages when navigating errors interactively, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor b2c4135 15/52: Clarify logic around flymake-diagnostic-types-alist, João Távora, 2017/10/01