From: Stefan Bund Date: Tue, 13 Dec 2016 10:29:26 +0000 (+0100) Subject: more restrictive compilation error message parsing X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=09bf11a8b7c990acca5afc370ffe730a61ad160b;p=emacs-init.git more restrictive compilation error message parsing this change removes unused compilation error parsing regexps and changes the 'gnu' style parser to ignore any filenames with whitespace. --- diff --git a/setup/emacsstuff.el b/setup/emacsstuff.el index 26dfeb5..8c88b80 100644 --- a/setup/emacsstuff.el +++ b/setup/emacsstuff.el @@ -1,15 +1,24 @@ -(let ((dir (concat (file-name-directory - (directory-file-name - (file-name-directory (or load-file-name - (when (boundp 'bytecomp-filename) bytecomp-filename) - buffer-file-name)))) - (file-name-as-directory "emacsstuff")))) - (add-to-list 'load-path dir)) - -(require 'g0dilstuff-init) -(require 'cc-ide) -(require 'softtext) -(require 'cc-mode) - -(define-key c++-mode-map "\C-c\C-c" 'recompile) -(define-key c++-mode-map "\C-c\C-i" 'comment-indent) +(let ((dir (concat (file-name-directory + (directory-file-name + (file-name-directory (or load-file-name + (when (boundp 'bytecomp-filename) bytecomp-filename) + buffer-file-name)))) + (file-name-as-directory "emacsstuff")))) + (add-to-list 'load-path dir)) + +(require 'g0dilstuff-init) +(require 'cc-ide) +(require 'softtext) +(require 'cc-mode) + +(define-key c++-mode-map "\C-c\C-c" 'recompile) +(define-key c++-mode-map "\C-c\C-i" 'comment-indent) + +;;; remove some unnecessary compilation error regexp settings which just cause problems +(setq compilation-error-regexp-alist (delq 'cucumber compilation-error-regexp-alist)) +(setq compilation-error-regexp-alist (delq 'mips-1 compilation-error-regexp-alist)) + +;;; remove matching whitespace in filenames for 'gnu' style error messages +(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))