From 450fd8e570335d393cc3e812e2dca20f44f142af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Thu, 11 Jul 2019 15:22:23 +0200 Subject: [PATCH] Set revert-buffer-function in ert-results-mode * lisp/emacs-lisp/ert.el (ert-results-mode): Set revert-buffer-function to re-run the same test selection. It is a good fit and permits use of the standard "g" key binding. --- lisp/emacs-lisp/ert.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index fe6eb19451b..c90c06d0849 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -2092,7 +2092,9 @@ and how to display message." ;;; Commands and button actions for the results buffer. (define-derived-mode ert-results-mode special-mode "ERT-Results" - "Major mode for viewing results of ERT test runs.") + "Major mode for viewing results of ERT test runs." + (setq-local revert-buffer-function + (lambda (&rest _) (ert-results-rerun-all-tests)))) (cl-loop for (key binding) in '( ;; Stuff that's not in the menu. -- 2.39.2