diff options
| author | Gerd Moellmann | 2001-01-31 15:10:34 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-01-31 15:10:34 +0000 |
| commit | 8564afc9ab6fe00152c3217fec6f85924f0b2620 (patch) | |
| tree | 73ce588e35ea17985fbea7a0352546447a15c5f4 /lisp | |
| parent | ee5cece023d3c0917221f7069378667a9644d88e (diff) | |
| download | emacs-8564afc9ab6fe00152c3217fec6f85924f0b2620.tar.gz emacs-8564afc9ab6fe00152c3217fec6f85924f0b2620.zip | |
(hi-lock-mode, hi-lock-line-face-buffer): Doc fix.
(hi-lock-find-patterns): Turn on font-lock-mode, if it is not
on already.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/hi-lock.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index e856e7e95d7..22ae9e7afb2 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; hi-lock.el --- Minor mode for interactive automatic highlighting. | 1 | ;;; hi-lock.el --- Minor mode for interactive automatic highlighting. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: David M. Koppelman, koppel@ee.lsu.edu | 5 | ;; Author: David M. Koppelman, koppel@ee.lsu.edu |
| 6 | ;; Keywords: faces, minor-mode, matching, display | 6 | ;; Keywords: faces, minor-mode, matching, display |
| @@ -243,7 +243,7 @@ calls." | |||
| 243 | "Toggle minor mode for interactively adding font-lock highlighting patterns. | 243 | "Toggle minor mode for interactively adding font-lock highlighting patterns. |
| 244 | 244 | ||
| 245 | If ARG positive turn hi-lock on. Issuing a hi-lock command will also | 245 | If ARG positive turn hi-lock on. Issuing a hi-lock command will also |
| 246 | turn hi-lock on. When hi-lock turned on an \"Automatic Highlighting\" | 246 | turn hi-lock on. When hi-lock is turned on an \"Automatic Highlighting\" |
| 247 | submenu is added to the \"Edit\" menu. The commands in the submenu, | 247 | submenu is added to the \"Edit\" menu. The commands in the submenu, |
| 248 | which can be called interactively, are: | 248 | which can be called interactively, are: |
| 249 | 249 | ||
| @@ -308,7 +308,7 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'." | |||
| 308 | Interactively, prompt for REGEXP then FACE. Buffer-local history | 308 | Interactively, prompt for REGEXP then FACE. Buffer-local history |
| 309 | list maintained for regexps, global history maintained for faces. | 309 | list maintained for regexps, global history maintained for faces. |
| 310 | \\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item. | 310 | \\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item. |
| 311 | (See info node `Minibuffer History')" | 311 | \(See info node `Minibuffer History')" |
| 312 | (interactive | 312 | (interactive |
| 313 | (list | 313 | (list |
| 314 | (hi-lock-regexp-okay | 314 | (hi-lock-regexp-okay |
| @@ -330,7 +330,7 @@ list maintained for regexps, global history maintained for faces. | |||
| 330 | Interactively, prompt for REGEXP then FACE. Buffer-local history | 330 | Interactively, prompt for REGEXP then FACE. Buffer-local history |
| 331 | list maintained for regexps, global history maintained for faces. | 331 | list maintained for regexps, global history maintained for faces. |
| 332 | \\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item. | 332 | \\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item. |
| 333 | (See info node `Minibuffer History')" | 333 | \(See info node `Minibuffer History')" |
| 334 | (interactive | 334 | (interactive |
| 335 | (list | 335 | (list |
| 336 | (hi-lock-regexp-okay | 336 | (hi-lock-regexp-okay |
| @@ -514,6 +514,7 @@ Optional argument END is maximum excursion." | |||
| 514 | (setq all-patterns (append patterns all-patterns)))))) | 514 | (setq all-patterns (append patterns all-patterns)))))) |
| 515 | (if (and (not hi-lock-mode) all-patterns) | 515 | (if (and (not hi-lock-mode) all-patterns) |
| 516 | (hi-lock-mode 1)) | 516 | (hi-lock-mode 1)) |
| 517 | (unless font-lock-mode (font-lock-mode)) | ||
| 517 | (if hi-lock-mode (hi-lock-set-file-patterns all-patterns)) | 518 | (if hi-lock-mode (hi-lock-set-file-patterns all-patterns)) |
| 518 | (if (interactive-p) | 519 | (if (interactive-p) |
| 519 | (message (format "Hi-lock added %d patterns." (length all-patterns))))))) | 520 | (message (format "Hi-lock added %d patterns." (length all-patterns))))))) |