comparison lisp/hi-lock.el @ 33974:e2a51eb8b6cc

Update from author.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 28 Nov 2000 22:32:21 +0000
parents 00803fb0f58e
children 2be11f207ca8
comparison
equal deleted inserted replaced
33973:1eb189c313a9 33974:e2a51eb8b6cc
117 (defgroup hi-lock-faces nil 117 (defgroup hi-lock-faces nil
118 "Faces for hi-lock." 118 "Faces for hi-lock."
119 :group 'hi-lock-interactive-text-highlighting) 119 :group 'hi-lock-interactive-text-highlighting)
120 120
121 (defface hi-yellow 121 (defface hi-yellow
122 '((((background dark)) 122 '((((background dark)) (:background "yellow" :foreground "black"))
123 (:background "yellow" :foreground "black"))
124 (t (:background "yellow"))) 123 (t (:background "yellow")))
125 "Default face for hi-lock mode." 124 "Default face for hi-lock mode."
126 :group 'hi-lock-faces) 125 :group 'hi-lock-faces)
127 126
128 (defface hi-pink 127 (defface hi-pink
476 (defun hi-lock-refontify () 475 (defun hi-lock-refontify ()
477 "Unfontify then refontify buffer. Used when hi-lock patterns change." 476 "Unfontify then refontify buffer. Used when hi-lock patterns change."
478 (interactive) 477 (interactive)
479 (font-lock-unfontify-buffer) 478 (font-lock-unfontify-buffer)
480 (cond 479 (cond
481 (jit-lock-mode nil) 480 (jit-lock-mode (jit-lock-refontify))
482 ;; Need a better way, since this assumes too much about lazy lock. 481 ;; Need a better way, since this assumes too much about lazy lock.
483 (lazy-lock-mode 482 (lazy-lock-mode
484 (let ((windows (get-buffer-window-list (current-buffer) 'nomini t))) 483 (let ((windows (get-buffer-window-list (current-buffer) 'nomini t)))
485 (while windows 484 (while windows
486 (lazy-lock-fontify-window (car windows)) 485 (lazy-lock-fontify-window (car windows))
526 (font-lock-add-keywords nil hi-lock-interactive-patterns))) 525 (font-lock-add-keywords nil hi-lock-interactive-patterns)))
527 526
528 (provide 'hi-lock) 527 (provide 'hi-lock)
529 528
530 ;;; hi-lock.el ends here 529 ;;; hi-lock.el ends here
531
532