Subject: [PATCH] progmodes/compile.el: check global-font-lock-mode

From: Jari Aalto <[email-masked]>
Date: Sat, 31 Jan 2009 14:34:46 +0200

Tags: patch

Here is patch to not to turn on font-lock unconditionally. Patch is
against Emacs version control tree check out 2009-01-31.

2009-01-31  Jari Aalto  <[email-masked]>

	* progmodes/compile.el (compilation-start): Run
	`font-lock-fontify-buffer' only if `global-font-lock-mode'
	is non-nil.

>From 473ca5257db6da8da4d31e4b9a2682f0972cc8c1 Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email-masked]>
Date: Sat, 31 Jan 2009 14:27:23 +0200
Subject: [PATCH] lisp/progmodes/compile.el: (compilation-start): check global-font-lock-mode

Signed-off-by: Jari Aalto <[email-masked]>
---
 lisp/progmodes/compile.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 2554730..1259403 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1326,7 +1326,8 @@ Returns the compilation buffer created."
 	  ;; Without async subprocesses, the buffer is not yet
 	  ;; fontified, so fontify it now.
 	  (let ((font-lock-verbose nil)) ; shut up font-lock messages
-	    (font-lock-fontify-buffer))
+	    (if global-font-lock-mode
+		(font-lock-fontify-buffer)))
 	  (set-buffer-modified-p nil)
 	  (message "Executing `%s'...done" command)))
       ;; Now finally cd to where the shell started make/grep/...
-- 
1.5.6.5