aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/display.texi58
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
655matches your specified regular expressions. For example, you might 655specify. For example, you might wish to see all the references to a
656wish to see all the references to a certain variable in a program 656certain variable in a program source file, highlight certain parts in
657source file, highlight certain parts in a voluminous output of some 657a voluminous output of some program, or make certain names stand out
658program, or make certain names stand out in an article. Use the 658in 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. 659disable) Hi Lock mode. To enable Hi Lock mode for all buffers, use
660To 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)}
661global-hi-lock-mode} or place @code{(global-hi-lock-mode 1)} in your 661in 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
665that you specify explicitly the regular expressions to highlight. You 664that you specify explicitly the regular expressions to highlight. You
@@ -711,33 +710,32 @@ at point, with comment delimiters to prevent them from changing your
711program. (This key binding runs the 710program. (This key binding runs the
712@code{hi-lock-write-interactive-patterns} command.) 711@code{hi-lock-write-interactive-patterns} command.)
713 712
714These patterns may be read the next time you visit the file while 713These patterns are extracted from the comments, if appropriate, if you
715Hi Lock mode is enabled, or whenever you use the @kbd{M-x 714invoke @kbd{M-x hi-lock-find-patterns}, or if you visit the file while
716hi-lock-find-patterns} command. 715Hi Lock mode is enabled (since that runs @code{hi-lock-find-patterns}).
717
718Patterns 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
721to a prompt, or if @code{hi-lock-file-patterns-policy} is bound to a
722function and that function returns t. The function is called with the
723patterns 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 720Extract regexp/face pairs from comments in the current buffer
729Re-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 722interactively with @code{highlight-regexp}, store them into the file
731Lock keywords might interactively enter patterns 723with @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
734including different faces for different parenthesized parts of the 724including different faces for different parenthesized parts of the
735match, and finally use this command 725match), and finally use this command (@code{hi-lock-find-patterns}) to
736(@code{hi-lock-write-interactive-patterns}) to have Hi Lock highlight 726have Hi Lock highlight the edited patterns.
737them.
738 727
739This command does nothing if the current major mode's symbol is a member 728@vindex hi-lock-file-patterns-policy
740of the list @code{hi-lock-exclude-modes}. 729The variable @code{hi-lock-file-patterns-policy} controls whether
730@code{hi-lock-find-patterns} should really do anything. Its value can
731be @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;
734if the function returns non-@code{nil}, the patterns are used.
735
736@vindex hi-lock-exclude-modes
737Also, @code{hi-lock-find-patterns} does nothing if the current major
738mode'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