From: Sam Steingold Date: Mon, 31 Jan 2011 16:49:44 +0000 (-0500) Subject: * lisp/progmodes/compile.el (compilation-enable-debug-messages): X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1322^2~53 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=038714abef7035381fd6b45fba98abbe86bc4400;p=emacs.git * 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. --- 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))))