GNU bug report logs -
#2134
[PATCH] progmodes/compile.el: check global-font-lock-mode
Previous Next
Reported by: Jari Aalto <jari.aalto <at> cante.net>
Date: Sat, 31 Jan 2009 12:40:04 UTC
Severity: minor
Merged with 801
Found in version 23.0.60
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2134 in the body.
You can then email your comments to 2134 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2134
; Package
emacs
.
(Sat, 31 Jan 2009 12:40:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jari Aalto <jari.aalto <at> cante.net>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sat, 31 Jan 2009 12:40:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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 <jari.aalto <at> cante.net>
* 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 <jari.aalto <at> cante.net>
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 <jari.aalto <at> cante.net>
---
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
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2134
; Package
emacs
.
(Sat, 31 Jan 2009 20:00:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sat, 31 Jan 2009 20:00:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 2134 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Here is patch to not to turn on font-lock unconditionally. Patch is
> against Emacs version control tree check out 2009-01-31.
If you read the rest of the compile.el code, you'll see that it uses
font-lock to do its job, which is why it's turned on unconditionally.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2134
; Package
emacs
.
(Sun, 01 Feb 2009 10:55:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jari Aalto <jari.aalto <at> cante.net>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 01 Feb 2009 10:55:03 GMT)
Full text and
rfc822 format available.
Message #15 received at 2134 <at> emacsbugs.donarmstrong.com (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> Here is patch to not to turn on font-lock unconditionally. Patch is
>> against Emacs version control tree check out 2009-01-31.
>
> If you read the rest of the compile.el code, you'll see that it uses
> font-lock to do its job, which is why it's turned on unconditionally.
>
The buffer handling could be improved to work without font lock. In some
cases the colors distract reading; thus font-lock is turned offm, but
RET no longer intreprets the line.
SUGGESTION
There could be be alternative handler to read the current line and
respond to RET (etc.) when font-lock is turned off. I'm supposing here
that standard grep syntax would be easy to handle:
default-directory: DIR
FILE:LINE:MATCH
Jari
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2134
; Package
emacs
.
(Sun, 01 Feb 2009 23:00:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
rms <at> gnu.org
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 01 Feb 2009 23:00:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 2134 <at> emacsbugs.donarmstrong.com (full text, mbox):
If you read the rest of the compile.el code, you'll see that it uses
font-lock to do its job, which is why it's turned on unconditionally.
What's happening here is not clean. Yes, compile.el needs to force
the Font Lock mechanism to work, all the time; but it should not show
the faces on the screen if the user disables Font Lock mode.
What this calls for is something like font-lock-syntactic-keywords.
Or a switch in Font Lock to say, "Unconditionally activate the Font
Lock mechanism, independent of whether Font Lock mode is enabled, but
store the faces in the `font-lock-face' property." With that, the
mechanism will always find the errors, but the user can control
whether to display the highlighting.
Tags removed: patch
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Mon, 02 Feb 2009 07:20:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2134
; Package
emacs
.
(Mon, 02 Feb 2009 17:15:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 02 Feb 2009 17:15:06 GMT)
Full text and
rfc822 format available.
Message #27 received at 2134 <at> emacsbugs.donarmstrong.com (full text, mbox):
>>> Here is patch to not to turn on font-lock unconditionally. Patch is
>>> against Emacs version control tree check out 2009-01-31.
>>
>> If you read the rest of the compile.el code, you'll see that it uses
>> font-lock to do its job, which is why it's turned on unconditionally.
> The buffer handling could be improved to work without font lock. In some
Yes, we indeed want that. Patches welcome.
The way it could work (most likely) is by not hooking directly into
font-lock but using after-change-functions instead (and then probably
call font-lock-fontify-region (or somesuch function) from it), and only
set the `font-lock-face' property rather than `face'.
Another way to do that, would be to change font-lock-mode to allow
"invisible" activation such that `font-lock-face' is not remapped to
`face' and such that font-lock keywords end up adding entries to
`font-lock-face' rather than to `face', so that the user can later on
turn on font-lock-mode (in normal mode) at which point all the faces
would be activated. That would be better.
Stefan
Forcibly Merged 801 2134.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Wed, 04 Feb 2009 03:50:03 GMT)
Full text and
rfc822 format available.
Added tag(s) patch.
Request was from
Jari Aalto <jari.aalto <at> cante.net>
to
control <at> emacsbugs.donarmstrong.com
.
(Sun, 13 Sep 2009 14:30:08 GMT)
Full text and
rfc822 format available.
Removed tag(s) patch.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Wed, 04 Nov 2009 22:10:08 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 26 Feb 2011 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.