From 8a2c39dcd3d2609f571eae9fa1a16d34dba91f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= Date: Mon, 14 Sep 2015 21:43:57 +0200 Subject: [PATCH] Handle output from Emacs byte-compilation properly It's common for module-developers to run Emacs byte-compilation in separate build-scripts. When invoking byte-compile on Emacs-lisp files you often get the following headers: - In toplevel form: - In end of data: When these errors show up in the output of a build-script initiated through M-x compile and show up in a compilation-mode buffer, these lines gets treated as guile-errors for files with the respective names "toplevel form" and "end of data". This breaks prev-error and next-error based navigation. This patch ensures those lines are treated as information only before getting to the guile-files regexp. --- lisp/progmodes/compile.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index a6e9ed8..cb5c884 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -477,6 +477,11 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" ;; "^\\([^ \t\r\n(]+\\) (\\([0-9]+\\):\\([0-9]+\\)) " 1 2 3) + + ;; ensure emacs-info headers are not treated as guile-errors. + ;; created using (rx (or "In toplevel form:" "In end of data:")) + (elisp-info "\\(?:In \\(?:\\(?:end of data\\|toplevel form\\):\\)\\)" nil nil nil 0) + (guile-file "^In \\(.+\\):\n" 1) (guile-line "^ *\\([0-9]+\\): *\\([0-9]+\\)" nil 1 2) ) -- 1.9.1