From: Stefan Bund Date: Tue, 13 Dec 2016 10:49:36 +0000 (+0100) Subject: add function to help debugging compilation-error-regex-alist related problems X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=32d555442b43d5849735ee64fb7f7bdde68c9c2e;p=emacs-init.git add function to help debugging compilation-error-regex-alist related problems --- diff --git a/setup/emacsstuff.el b/setup/emacsstuff.el index 8c88b80..cddd38c 100644 --- a/setup/emacsstuff.el +++ b/setup/emacsstuff.el @@ -22,3 +22,17 @@ (setf (nth 1 (assoc 'gnu compilation-error-regexp-alist-alist)) (replace-regexp-in-string (regexp-quote " [^-/\n]\\|") "" (nth 1 (assoc 'gnu compilation-error-regexp-alist-alist)) t t)) + +(defun debug-compilation-error-regexps () + (interactive) + (save-excursion + (save-restriction + (beginning-of-line) + (narrow-to-region (point) (save-excursion (forward-line 1) (point))) + (let ((match (loop for key in compilation-error-regexp-alist + for elt = (assoc key compilation-error-regexp-alist-alist) + if (and elt (re-search-forward (cadr elt) nil t)) + thereis key))) + (if match + (message "compilation-error-regexp-alist-alist key: %s" match) + (error "no error line at point"))))))