GNU bug report logs - #14179
[PATCH] hi-lock: more appropriate use of font-locking

Previous Next

Package: emacs;

Reported by: E Sabof <esabof <at> gmail.com>

Date: Thu, 11 Apr 2013 04:24:02 UTC

Severity: normal

Tags: patch

Done: Juri Linkov <juri <at> jurta.org>

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 14179 in the body.
You can then email your comments to 14179 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14179; Package emacs. (Thu, 11 Apr 2013 04:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to E Sabof <esabof <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 11 Apr 2013 04:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: E Sabof <esabof <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] hi-lock: more appropriate use of font-locking
Date: Thu, 11 Apr 2013 05:19:13 +0100
[Message part 1 (text/plain, inline)]
Most modes that use custom fontification (ex occur-mode), won't turn the
font-lock-mode off. So hi-lock would add a keyword, and remove all existing
fontification. The below patch fixes this behaviour.

Evgeni

Modified   lisp/hi-lock.el
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index e2dc4ea..e16ed76 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -689,7 +689,7 @@ Otherwise, read face name from minibuffer with
completion and history."
     ;; Refuse to highlight a text that is already highlighted.
     (unless (assoc regexp hi-lock-interactive-patterns)
       (push pattern hi-lock-interactive-patterns)
-      (if font-lock-mode
+      (if (and font-lock-mode (font-lock-specified-p major-mode))
   (progn
     (font-lock-add-keywords nil (list pattern) t)
     (font-lock-fontify-buffer))
[Message part 2 (text/html, inline)]

Reply sent to Juri Linkov <juri <at> jurta.org>:
You have taken responsibility. (Fri, 20 Dec 2013 19:48:02 GMT) Full text and rfc822 format available.

Notification sent to E Sabof <esabof <at> gmail.com>:
bug acknowledged by developer. (Fri, 20 Dec 2013 19:48:02 GMT) Full text and rfc822 format available.

Message #10 received at 14179-done <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: E Sabof <esabof <at> gmail.com>
Cc: 14179-done <at> debbugs.gnu.org
Subject: Re: bug#14179: [PATCH] hi-lock: more appropriate use of font-locking
Date: Fri, 20 Dec 2013 21:47:16 +0200
> Most modes that use custom fontification (ex occur-mode), won't turn the
> font-lock-mode off. So hi-lock would add a keyword, and remove all existing
> fontification. The below patch fixes this behaviour.

Thanks, fixed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Jan 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.