unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14179: [PATCH] hi-lock: more appropriate use of font-locking
@ 2013-04-11  4:19 E Sabof
  2013-12-20 19:47 ` Juri Linkov
  0 siblings, 1 reply; 2+ messages in thread
From: E Sabof @ 2013-04-11  4:19 UTC (permalink / raw)
  To: 14179

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

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))

[-- Attachment #2: Type: text/html, Size: 1445 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#14179: [PATCH] hi-lock: more appropriate use of font-locking
  2013-04-11  4:19 bug#14179: [PATCH] hi-lock: more appropriate use of font-locking E Sabof
@ 2013-12-20 19:47 ` Juri Linkov
  0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2013-12-20 19:47 UTC (permalink / raw)
  To: E Sabof; +Cc: 14179-done

> 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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-20 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-11  4:19 bug#14179: [PATCH] hi-lock: more appropriate use of font-locking E Sabof
2013-12-20 19:47 ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).