diff options
| -rw-r--r-- | man/display.texi | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/man/display.texi b/man/display.texi index c0132da35d4..81ea723ddb8 100644 --- a/man/display.texi +++ b/man/display.texi | |||
| @@ -651,15 +651,14 @@ recently. | |||
| 651 | 651 | ||
| 652 | @cindex Hi Lock mode | 652 | @cindex Hi Lock mode |
| 653 | @findex hi-lock-mode | 653 | @findex hi-lock-mode |
| 654 | Hi Lock mode is another minor mode, which highlights text that | 654 | Hi Lock mode highlights text that matches regular expressions you |
| 655 | matches your specified regular expressions. For example, you might | 655 | specify. For example, you might wish to see all the references to a |
| 656 | wish to see all the references to a certain variable in a program | 656 | certain variable in a program source file, highlight certain parts in |
| 657 | source file, highlight certain parts in a voluminous output of some | 657 | a voluminous output of some program, or make certain names stand out |
| 658 | program, or make certain names stand out in an article. Use the | 658 | in an article. Use the @kbd{M-x hi-lock-mode} command to enable (or |
| 659 | @kbd{M-x hi-lock-mode} command to enable (or disable) Hi Lock mode. | 659 | disable) Hi Lock mode. To enable Hi Lock mode for all buffers, use |
| 660 | To enable Hi Lock mode for all buffers, use @kbd{M-x | 660 | @kbd{M-x global-hi-lock-mode} or place @code{(global-hi-lock-mode 1)} |
| 661 | global-hi-lock-mode} or place @code{(global-hi-lock-mode 1)} in your | 661 | in your @file{.emacs} file. |
| 662 | @file{.emacs} file. | ||
| 663 | 662 | ||
| 664 | Hi Lock mode works like Font Lock mode (@pxref{Font Lock}), except | 663 | Hi Lock mode works like Font Lock mode (@pxref{Font Lock}), except |
| 665 | that you specify explicitly the regular expressions to highlight. You | 664 | that you specify explicitly the regular expressions to highlight. You |
| @@ -711,33 +710,32 @@ at point, with comment delimiters to prevent them from changing your | |||
| 711 | program. (This key binding runs the | 710 | program. (This key binding runs the |
| 712 | @code{hi-lock-write-interactive-patterns} command.) | 711 | @code{hi-lock-write-interactive-patterns} command.) |
| 713 | 712 | ||
| 714 | These patterns may be read the next time you visit the file while | 713 | These patterns are extracted from the comments, if appropriate, if you |
| 715 | Hi Lock mode is enabled, or whenever you use the @kbd{M-x | 714 | invoke @kbd{M-x hi-lock-find-patterns}, or if you visit the file while |
| 716 | hi-lock-find-patterns} command. | 715 | Hi Lock mode is enabled (since that runs @code{hi-lock-find-patterns}). |
| 717 | |||
| 718 | Patterns are not read if the buffer's mode is listed in | ||
| 719 | @code{hi-lock-exclude-modes}. Patterns are only used if | ||
| 720 | @code{hi-lock-file-patterns-policy} is 'ask and the user responds yes | ||
| 721 | to a prompt, or if @code{hi-lock-file-patterns-policy} is bound to a | ||
| 722 | function and that function returns t. The function is called with the | ||
| 723 | patterns as an argument. | ||
| 724 | 716 | ||
| 725 | @item C-x w i | 717 | @item C-x w i |
| 726 | @kindex C-x w i | 718 | @kindex C-x w i |
| 727 | @findex hi-lock-find-patterns | 719 | @findex hi-lock-find-patterns |
| 728 | @vindex hi-lock-exclude-modes | 720 | Extract regexp/face pairs from comments in the current buffer |
| 729 | Re-read regexp/face pairs in the current buffer | 721 | (@code{hi-lock-find-patterns}). Thus, you can enter patterns |
| 730 | (@code{hi-lock-write-interactive-patterns}). Users familiar with Font | 722 | interactively with @code{highlight-regexp}, store them into the file |
| 731 | Lock keywords might interactively enter patterns | 723 | with @code{hi-lock-write-interactive-patterns}, edit them (perhaps |
| 732 | (@code{highlight-regexp}), write them into the file | ||
| 733 | (@code{hi-lock-write-interactive-patterns}), edit them, perhaps | ||
| 734 | including different faces for different parenthesized parts of the | 724 | including different faces for different parenthesized parts of the |
| 735 | match, and finally use this command | 725 | match), and finally use this command (@code{hi-lock-find-patterns}) to |
| 736 | (@code{hi-lock-write-interactive-patterns}) to have Hi Lock highlight | 726 | have Hi Lock highlight the edited patterns. |
| 737 | them. | ||
| 738 | 727 | ||
| 739 | This command does nothing if the current major mode's symbol is a member | 728 | @vindex hi-lock-file-patterns-policy |
| 740 | of the list @code{hi-lock-exclude-modes}. | 729 | The variable @code{hi-lock-file-patterns-policy} controls whether |
| 730 | @code{hi-lock-find-patterns} should really do anything. Its value can | ||
| 731 | be @code{nil} (do nothing), @code{t} (extract the patterns), | ||
| 732 | @code{ask} (query the user), or a function. If it is a function, | ||
| 733 | @code{hi-lock-find-patterns} calls it with the patterns as argument; | ||
| 734 | if the function returns non-@code{nil}, the patterns are used. | ||
| 735 | |||
| 736 | @vindex hi-lock-exclude-modes | ||
| 737 | Also, @code{hi-lock-find-patterns} does nothing if the current major | ||
| 738 | mode's symbol is a member of the list @code{hi-lock-exclude-modes}. | ||
| 741 | @end table | 739 | @end table |
| 742 | 740 | ||
| 743 | @node Fringes | 741 | @node Fringes |