[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7771: 23.1; can't turn off font-lock-mode globally

From: Eli Zaretskii
Subject: bug#7771: 23.1; can't turn off font-lock-mode globally
Date: Mon, 03 Jan 2011 20:01:48 +0200

> From: "Drew Adams" <address@hidden>
> Cc: <address@hidden>, <address@hidden>
> Date: Mon, 3 Jan 2011 08:00:34 -0800
> > Users will not be deprived of anything, I think.  The problem is that
> > these features turn font-lock on in the compilation buffer, which is a
> > nuisance (for those who turned it off).
> Good.  But what was said was that "compile (and grep) require font-lock to
> work".  That's what my comment responded to.

I understand, but I think the original comment was slightly
inaccurate.  I think a more accurate statement would be
"compilation-mode needs font-lock to be turned on for its
functionality, so it turns it on unconditionally in the compilation
buffer."  Here's the code from compilation-setup:

  (set (make-local-variable 'font-lock-support-mode) nil)
  (set (make-local-variable 'font-lock-maximum-size) nil)
  (if minor
      (let ((fld font-lock-defaults))
        (font-lock-add-keywords nil (compilation-mode-font-lock-keywords))
        (if font-lock-mode
            (if fld
    (setq font-lock-defaults '(compilation-mode-font-lock-keywords t))
    ;; maybe defer font-lock till after derived mode is set up
    (run-mode-hooks 'compilation-turn-on-font-lock)))

and compilation-turn-on-font-lock is defined like this:

  (defconst compilation-turn-on-font-lock 'turn-on-font-lock)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]