;;; hi-lock.el --- minor mode for interactive automatic highlighting
-;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc.
;; Author: David M. Koppelman, koppel@ee.lsu.edu
;; Keywords: faces, minor-mode, matching, display
;; Boston, MA 02111-1307, USA.
;;; Commentary:
-;;
+;;
;; With the hi-lock commands text matching interactively entered
;; regexp's can be highlighted. For example, `M-x highlight-regexp
;; RET clearly RET RET' will highlight all occurrences of `clearly'
;; to the edit menu.
;;
;; (hi-lock-mode 1)
-;;
+;;
;; You might also want to bind the hi-lock commands to more
;; finger-friendly sequences:
:group 'hi-lock-interactive-text-highlighting)
(defface hi-yellow
- '((((background dark)) (:background "yellow" :foreground "black"))
+ '((((min-colors 88) (background dark))
+ (:background "yellow1" :foreground "black"))
+ (((background dark)) (:background "yellow" :foreground "black"))
+ (((min-colors 88)) (:background "yellow1"))
(t (:background "yellow")))
"Default face for hi-lock mode."
:group 'hi-lock-faces)
:group 'hi-lock-faces)
(defface hi-green
- '((((background dark)) (:background "green" :foreground "black"))
+ '((((min-colors 88) (background dark))
+ (:background "green1" :foreground "black"))
+ (((background dark)) (:background "green" :foreground "black"))
+ (((min-colors 88)) (:background "green1"))
(t (:background "green")))
"Face for hi-lock mode."
:group 'hi-lock-faces)
:group 'hi-lock-faces)
(defface hi-blue-b
- '((t (:weight bold :foreground "blue")))
+ '((((min-colors 88)) (:weight bold :foreground "blue1"))
+ (t (:weight bold :foreground "blue")))
"Face for hi-lock mode."
:group 'hi-lock-faces)
(defface hi-green-b
- '((t (:weight bold :foreground "green")))
+ '((((min-colors 88)) (:weight bold :foreground "green1"))
+ (t (:weight bold :foreground "green")))
"Face for hi-lock mode."
:group 'hi-lock-faces)
(defface hi-red-b
- '((t (:weight bold :foreground "red")))
+ '((((min-colors 88)) (:weight bold :foreground "red1"))
+ (t (:weight bold :foreground "red")))
"Face for hi-lock mode."
:group 'hi-lock-faces)
Highlight matches of phrase PHRASE in current buffer with FACE.
(PHRASE can be any REGEXP, but spaces will be replaced by matches
to whitespace and initial lower-case letters will become case insensitive.)
-
+
\\[highlight-lines-matching-regexp] REGEXP FACE
Highlight lines containing matches of REGEXP in current buffer with FACE.
(> (prefix-numeric-value arg) 0)))
;; Turned on.
(when (and (not hi-lock-mode-prev) hi-lock-mode)
- (add-hook 'find-file-hooks 'hi-lock-find-file-hook)
+ (add-hook 'find-file-hook 'hi-lock-find-file-hook)
(add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook)
+ (when (eq nil font-lock-defaults)
+ (setq font-lock-defaults '(nil)))
+ (unless font-lock-mode
+ (font-lock-mode 1))
(define-key-after menu-bar-edit-menu [hi-lock]
(cons "Regexp Highlighting" hi-lock-menu))
(dolist (buffer (buffer-list))
hi-lock-file-patterns nil)
(when font-lock-mode (hi-lock-refontify)))))
(define-key-after menu-bar-edit-menu [hi-lock] nil)
- (remove-hook 'find-file-hooks 'hi-lock-find-file-hook)
+ (remove-hook 'find-file-hook 'hi-lock-find-file-hook)
(remove-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook))))
(provide 'hi-lock)
+;; arch-tag: d2e8fd07-4cc9-4c6f-a200-1e729bc54066
;;; hi-lock.el ends here