# HG changeset patch # User Augie Fackler # Date 2019-02-22 00:59:00 # Node ID b6a757de2fff91941b0c89367ec00e6fc5391501 # Parent 251332dbf33da51b8fb5b1c775ab45a2e8e593b7 contrib: add compilation-mode linking for our test output These regular expressions will cause compilation-mode buffers in emacs to link to source when there are check-code errors in the output of a .t test. In the true tradition of this file, I also have no idea what I'm doing. Differential Revision: https://phab.mercurial-scm.org/D6000 diff --git a/contrib/hg-test-mode.el b/contrib/hg-test-mode.el --- a/contrib/hg-test-mode.el +++ b/contrib/hg-test-mode.el @@ -53,4 +53,11 @@ (setq mode-name "hg-test") (run-hooks 'hg-test-mode-hook)) +(with-eval-after-load "compile" + ;; Link to source files in test-check-code.t violations. + (add-to-list 'compilation-error-regexp-alist-alist + '(hg-test-check-code-output + "\\+ \\([^:\n]+\\):\\([0-9]+\\):$" 1 2)) + (add-to-list 'compilation-error-regexp-alist 'hg-test-check-code-output)) + (provide 'hg-test-mode)