diff options
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/syntax.c b/src/syntax.c index 695b519c5f8..b2799924a5b 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -341,9 +341,15 @@ dec_bytepos (bytepos) | |||
| 341 | return bytepos; | 341 | return bytepos; |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | /* Find a defun-start that is the last one before POS (or nearly the last). | 344 | /* Return a defun-start position before before POS and not too far before. |
| 345 | We record what we find, so that another call in the same area | 345 | It should be the last one before POS, or nearly the last. |
| 346 | can return the same value right away. | 346 | |
| 347 | When open_paren_in_column_0_is_defun_start is nonzero, | ||
| 348 | the beginning of every line is treated as a defun-start. | ||
| 349 | |||
| 350 | We record the information about where the scan started | ||
| 351 | and what its result was, so that another call in the same area | ||
| 352 | can return the same value very quickly. | ||
| 347 | 353 | ||
| 348 | There is no promise at which position the global syntax data is | 354 | There is no promise at which position the global syntax data is |
| 349 | valid on return from the subroutine, so the caller should explicitly | 355 | valid on return from the subroutine, so the caller should explicitly |