From d54ba0d8cdc5bca846e547eaf01aa94f73202b67 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 14 Mar 2016 17:03:27 +0100 Subject: contrib: add lr.el --- contrib/lr.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 contrib/lr.el (limited to 'contrib') diff --git a/contrib/lr.el b/contrib/lr.el new file mode 100644 index 0000000..ea9d264 --- /dev/null +++ b/contrib/lr.el @@ -0,0 +1,19 @@ +;;; lr.el --- run `lr' and display the results + +(define-compilation-mode lr-mode "Lr" + (set (make-local-variable 'compilation-error-regexp-alist) + '(("\\([^ \n']+\\)[*/=>@|]$" 1) + ("\\([^ \n']+\\)$" 1) + ("'\\(.+\\)'$" 1))) + (set (make-local-variable 'next-error-highlight) nil)) + +(defun lr (command-args) + "Run lr, with user-specified args, and collect output in a buffer. +While lr runs asynchronously, you can use \\[next-error] (M-x next-error), +or RET in the *lr* buffer, to go to the files lr found." + (interactive (list (read-shell-command "Run lr (like this): " + "lr " 'lr-history))) + (compilation-start command-args 'lr-mode)) + +(provide 'lr) +;;; lr.el ends here -- cgit 1.4.1