File: hi-lock.el.html

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
 using a yellow background face. New occurrences of clearly will
 be highlighted as they are typed. M-x unhighlight-regexp RET
 will remove the highlighting. Any existing face can be used for
 highlighting and a set of appropriate faces is provided. The
 regexps can be written into the current buffer in a form that will
 be recognized the next time the corresponding file is read (when
 file patterns is turned on).

 Applications:

   In program source code highlight a variable to quickly see all
   places it is modified or referenced:
   M-x highlight-regexp RET ground_contact_switches_closed RET RET

   In a shell or other buffer that is showing lots of program
   output, highlight the parts of the output you're interested in:
   M-x highlight-regexp RET Total execution time [0-9]+ RET hi-blue-b RET

   In buffers displaying tables, highlight the lines you're interested in:
   M-x highlight-lines-matching-regexp RET January 2000 RET hi-black-b RET

   When writing text, highlight personal cliches. This can be
   amusing.
   M-x highlight-phrase RET as can be seen RET RET

 Setup:

   Put the following code in your init file. This turns on
   hi-lock mode and adds a "Regexp Highlighting" entry
   to the edit menu.

   (global-hi-lock-mode 1)

   To enable the use of patterns found in files (presumably placed
   there by hi-lock) include the following in your init file:

   (setq hi-lock-file-patterns-policy 'ask)

   If you get tired of being asked each time a file is loaded replace
   ask with a function that returns t if patterns should be read.

   You might also want to bind the hi-lock commands to more
   finger-friendly sequences:

   (keymap-set hi-lock-map "C-z C-h" 'highlight-lines-matching-regexp)
   (keymap-set hi-lock-map "C-z i" 'hi-lock-find-patterns)
   (keymap-set hi-lock-map "C-z h" 'highlight-regexp)
   (keymap-set hi-lock-map "C-z p" 'highlight-phrase)
   (keymap-set hi-lock-map "C-z r" 'unhighlight-regexp)
   (keymap-set hi-lock-map "C-z b" 'hi-lock-write-interactive-patterns))

   See the documentation for hi-lock-mode C-h f hi-lock-mode for
   additional instructions.

Sample file patterns:

; Hi-lock: (("^;;; .*" (0 (quote hi-black-hb) t)))
; Hi-lock: ( ("make-variable-buffer-\\\\(local\\\\)" (0 font-lock-keyword-face)(1 'italic append)))))
; Hi-lock: end

Defined variables (19)

global-hi-lock-modeNon-nil if Global Hi-Lock mode is enabled.
global-hi-lock-mode-hookHook run after entering or leaving ‘global-hi-lock-mode’.
hi-lock--hashcons-hashHash table used to hash cons regexps.
hi-lock--unused-facesList of faces that is not used and is available for highlighting new text.
hi-lock-auto-select-faceWhen nil, highlighting commands prompt for the face to use.
hi-lock-exclude-modesList of major modes in which hi-lock will not run.
hi-lock-face-defaultsDefault face names for hi-lock interactive functions.
hi-lock-file-patternsPatterns found in file for hi-lock. Should not be changed.
hi-lock-file-patterns-policySpecify when hi-lock should use patterns found in file.
hi-lock-file-patterns-prefixString used to identify hi-lock patterns at the start of files.
hi-lock-file-patterns-rangeLimit of search in a buffer for hi-lock patterns.
hi-lock-highlight-rangeSize of area highlighted by hi-lock when font-lock not active.
hi-lock-interactive-lightersHuman-readable lighters for ‘hi-lock-interactive-patterns’.
hi-lock-interactive-patternsPatterns provided to hi-lock by user. Should not be changed.
hi-lock-mapKeymap for ‘hi-lock-mode’.
hi-lock-menuMenu for hi-lock mode.
hi-lock-modeNon-nil if Hi-Lock mode is enabled.
hi-lock-mode-hookHook run after entering or leaving ‘hi-lock-mode’.
hi-lock-use-overlaysWhether to always use overlays instead of font-lock rules.

Defined functions (28)

global-hi-lock-mode(&optional ARG)
hi-lock--hashcons(STRING)
hi-lock-context-menu(MENU CLICK)
hi-lock-face-buffer(REGEXP &optional FACE SUBEXP LIGHTER)
hi-lock-face-phrase-buffer(REGEXP &optional FACE)
hi-lock-face-symbol-at-mouse(EVENT)
hi-lock-face-symbol-at-point()
hi-lock-find-patterns()
hi-lock-font-lock-hook()
hi-lock-keyword->face(KEYWORD)
hi-lock-line-face-buffer(REGEXP &optional FACE)
hi-lock-menu(ARG1)
hi-lock-mode(&optional ARG)
hi-lock-read-face-name()
hi-lock-read-regexp(PROMPT)
hi-lock-regexp-okay(REGEXP)
hi-lock-revert-buffer-rehighlight()
hi-lock-set-file-patterns(PATTERNS)
hi-lock-set-pattern(REGEXP FACE &optional SUBEXP LIGHTER CASE-FOLD SPACES-REGEXP)
hi-lock-unface-buffer(REGEXP)
hi-lock-unload-function()
hi-lock-write-interactive-patterns()
highlight-lines-matching-regexp(REGEXP &optional FACE)
highlight-phrase(REGEXP &optional FACE)
highlight-regexp(REGEXP &optional FACE SUBEXP LIGHTER)
highlight-symbol-at-mouse(EVENT)
highlight-symbol-at-point()
unhighlight-regexp(REGEXP)

Defined faces (11)

hi-aquamarineFace for hi-lock mode.
hi-black-bFace for hi-lock mode.
hi-black-hbFace for hi-lock mode.
hi-blueFace for hi-lock mode.
hi-blue-bFace for hi-lock mode.
hi-greenFace for hi-lock mode.
hi-green-bFace for hi-lock mode.
hi-pinkFace for hi-lock mode.
hi-red-bFace for hi-lock mode.
hi-salmonFace for hi-lock mode.
hi-yellowDefault face for hi-lock mode.