X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=setup%2Femacsstuff.el;h=cddd38c9043cf97be3f5160d1f5174d0bd147c75;hb=32d555442b43d5849735ee64fb7f7bdde68c9c2e;hp=8c88b80cb99bc504f6303105515db969d79fcf75;hpb=09bf11a8b7c990acca5afc370ffe730a61ad160b;p=emacs-init.git 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"))))))