From 038714abef7035381fd6b45fba98abbe86bc4400 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Mon, 31 Jan 2011 11:49:44 -0500 Subject: [PATCH] * lisp/progmodes/compile.el (compilation-enable-debug-messages): Add a variable to make the parsing messages introduced in 2011-01-28T22:12:05Z!monnier@iro.umontreal.ca optional. (compilation-parse-errors, compilation--flush-parse): Use it. --- lisp/ChangeLog | 8 ++++++++ lisp/progmodes/compile.el | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d9e4d58af59..462d57745c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2011-01-31 Sam Steingold + + * progmodes/compile.el (compilation-enable-debug-messages): + Add a variable to make the parsing messages introduced in + 2011-01-28T22:12:05Z!monnier@iro.umontreal.ca optional. + (compilation-parse-errors, compilation--flush-parse): Use it. + + 2011-01-31 Deniz Dogan * net/rcirc.el: Clean log filenames (Bug#7933). diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 5bb3bf227f2..8bc0f221beb 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -732,6 +732,9 @@ info, are considered errors." :group 'compilation :version "22.1") +(defvar compilation-enable-debug-messages nil + "Enable debug messages while parsing the compilation buffer.") + (defun compilation-set-skip-threshold (level) "Switch the `compilation-skip-threshold' level." (interactive @@ -1169,7 +1172,8 @@ FMTS is a list of format specs for transforming the file name. "Parse errors between START and END. The errors recognized are the ones specified in RULES which default to `compilation-error-regexp-alist' if RULES is nil." - (message "compilation-parse-errors: %S %S" start end) + (when compilation-enable-debug-messages + (message "compilation-parse-errors: %S %S" start end)) (dolist (item (or rules compilation-error-regexp-alist)) (if (symbolp item) (setq item (cdr (assq item @@ -1225,7 +1229,6 @@ to `compilation-error-regexp-alist' if RULES is nil." (goto-char start) (while (re-search-forward pat end t) - (when (setq props (compilation-error-properties file line end-line col end-col (or type 2) fmt)) @@ -1299,7 +1302,8 @@ to `compilation-error-regexp-alist' if RULES is nil." (defun compilation--flush-parse (start end) "Mark the region between START and END for re-parsing." - (message "compilation--flush-parse: %S %S" start end) + (when compilation-enable-debug-messages + (message "compilation--flush-parse: %S %S" start end)) (if (markerp compilation--parsed) (move-marker compilation--parsed (min start compilation--parsed)))) -- 2.39.5