diff options
| author | Stefan Monnier | 2006-11-19 19:27:29 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-11-19 19:27:29 +0000 |
| commit | 22e659d77fcdb7c5cfc93e70d14695043a5d6dde (patch) | |
| tree | 64010b1e1a73dd01e28b85df6015ebb5a899118c | |
| parent | 784c9f3c227e535c7e87bfbe671354fe897da8db (diff) | |
| download | emacs-22e659d77fcdb7c5cfc93e70d14695043a5d6dde.tar.gz emacs-22e659d77fcdb7c5cfc93e70d14695043a5d6dde.zip | |
Rephrase some font-lock-multiline text.
| -rw-r--r-- | lispref/modes.texi | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi index d5e058fa1c8..d6af11434b9 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -3043,16 +3043,19 @@ constructs: | |||
| 3043 | 3043 | ||
| 3044 | @itemize | 3044 | @itemize |
| 3045 | @item | 3045 | @item |
| 3046 | Place a @code{font-lock-multiline} | ||
| 3047 | property on the construct when it is added to the buffer. | ||
| 3048 | @item | ||
| 3049 | Use @code{font-lock-fontify-region-function} hook to extend the scan | ||
| 3050 | so that the scanned text never starts or ends in the middle of a | ||
| 3051 | multiline construct. | ||
| 3052 | @item | ||
| 3053 | Add a function to @code{font-lock-extend-region-functions} that does | 3046 | Add a function to @code{font-lock-extend-region-functions} that does |
| 3054 | the @emph{identification} and extends the scan so that the scanned | 3047 | the @emph{identification} and extends the scan so that the scanned |
| 3055 | text never starts or ends in the middle of a multiline construct. | 3048 | text never starts or ends in the middle of a multiline construct. |
| 3049 | @item | ||
| 3050 | Use the @code{font-lock-fontify-region-function} hook similarly to | ||
| 3051 | extend the scan so that the scanned text never starts or ends in the | ||
| 3052 | middle of a multiline construct. | ||
| 3053 | @item | ||
| 3054 | Somehow identify the multiline construct right when it gets inserted | ||
| 3055 | into the buffer (or at any point after that but before font-lock | ||
| 3056 | tries to highlight it), and mark it with a @code{font-lock-multiline} | ||
| 3057 | which will instruct font-lock not to start or end the scan in the | ||
| 3058 | middle of the construct. | ||
| 3056 | @end itemize | 3059 | @end itemize |
| 3057 | 3060 | ||
| 3058 | There are three ways to do rehighlighting of multiline constructs: | 3061 | There are three ways to do rehighlighting of multiline constructs: |
| @@ -3062,9 +3065,9 @@ text never starts or ends in the middle of a multiline construct. | |||
| 3062 | Place a @code{font-lock-multiline} property on the construct. This | 3065 | Place a @code{font-lock-multiline} property on the construct. This |
| 3063 | will rehighlight the whole construct if any part of it is changed. In | 3066 | will rehighlight the whole construct if any part of it is changed. In |
| 3064 | some cases you can do this automatically by setting the | 3067 | some cases you can do this automatically by setting the |
| 3065 | @code{font-lock-multiline} variable. | 3068 | @code{font-lock-multiline} variable, which see. |
| 3066 | @item | 3069 | @item |
| 3067 | Use @code{jit-lock-contextually}. This will only rehighlight the part | 3070 | Rely on @code{jit-lock-contextually}. This will only rehighlight the part |
| 3068 | of the construct that follows the actual change, and will do it after | 3071 | of the construct that follows the actual change, and will do it after |
| 3069 | a short delay. This only works if the highlighting of the various | 3072 | a short delay. This only works if the highlighting of the various |
| 3070 | parts of your multiline construct never depends on text in subsequent | 3073 | parts of your multiline construct never depends on text in subsequent |