diff options
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/jit-lock.el | 17 |
2 files changed, 24 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 370a32ae95e..7f8cd2c7de5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-10-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * jit-lock.el (jit-lock-fontify-now): | ||
| 4 | Move jit-lock-context-unfontify-pos to avoid wasted work. | ||
| 5 | |||
| 1 | 2005-10-17 Michael Albinus <michael.albinus@gmx.de> | 6 | 2005-10-17 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * net/tramp.el (tramp-completion-mode): New defvar. Used in | 8 | * net/tramp.el (tramp-completion-mode): New defvar. Used in |
| @@ -33,7 +38,7 @@ | |||
| 33 | 38 | ||
| 34 | * savehist.el: Don't require CL at runtime. | 39 | * savehist.el: Don't require CL at runtime. |
| 35 | (savehist-xemacs): Remove. | 40 | (savehist-xemacs): Remove. |
| 36 | (savehist-coding-system): Use utf-8 if available, regardless of religion. | 41 | (savehist-coding-system): Use utf-8 if present, regardless of religion. |
| 37 | (savehist-no-conversion): Use (featurep 'xemacs). | 42 | (savehist-no-conversion): Use (featurep 'xemacs). |
| 38 | (savehist-load): Check existence of start-itimer rather than XEmacs. | 43 | (savehist-load): Check existence of start-itimer rather than XEmacs. |
| 39 | Use an idle timer. | 44 | Use an idle timer. |
| @@ -156,14 +161,13 @@ | |||
| 156 | * toolbar/gud-up.*: Moved to etc/images/gud/up.*. | 161 | * toolbar/gud-up.*: Moved to etc/images/gud/up.*. |
| 157 | * toolbar/gud-watch.*: Moved to etc/images/gud/watch.*. | 162 | * toolbar/gud-watch.*: Moved to etc/images/gud/watch.*. |
| 158 | 163 | ||
| 159 | * progmodes/gud.el (gud-tool-bar-map): Renamed the images | 164 | * progmodes/gud.el (gud-tool-bar-map): Rename the images |
| 160 | appropriately (for example, gud-break to gud/break). | 165 | appropriately (for example, gud-break to gud/break). |
| 161 | 166 | ||
| 162 | 2005-10-14 Chong Yidong <cyd@stupidchicken.com> | 167 | 2005-10-14 Chong Yidong <cyd@stupidchicken.com> |
| 163 | 168 | ||
| 164 | * longlines.el (longlinges-search-function) | 169 | * longlines.el (longlinges-search-function) |
| 165 | (longlines-search-forward, longlines-search-backward): New | 170 | (longlines-search-forward, longlines-search-backward): New functions. |
| 166 | functions. | ||
| 167 | (longlines-mode): Set isearch-search-fun-function to | 171 | (longlines-mode): Set isearch-search-fun-function to |
| 168 | longlinges-search-function. | 172 | longlinges-search-function. |
| 169 | 173 | ||
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 2f8fcba91d1..0a36b719ba1 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el | |||
| @@ -349,6 +349,16 @@ Defaults to the whole buffer. END can be out of bounds." | |||
| 349 | (goto-char next) (setq next (line-beginning-position 2)) | 349 | (goto-char next) (setq next (line-beginning-position 2)) |
| 350 | (goto-char start) (setq start (line-beginning-position)) | 350 | (goto-char start) (setq start (line-beginning-position)) |
| 351 | 351 | ||
| 352 | ;; Make sure the contextual refontification doesn't re-refontify | ||
| 353 | ;; what's already been refontified. | ||
| 354 | (when jit-lock-context-unfontify-pos | ||
| 355 | (if (and (< jit-lock-context-unfontify-pos next) | ||
| 356 | (when (and jit-lock-context-unfontify-pos | ||
| 357 | (< jit-lock-context-unfontify-pos next) | ||
| 358 | (>= jit-lock-context-unfontify-pos start)) | ||
| 359 | (setq jit-lock-context-unfontify-pos next))) | ||
| 360 | (setq jit-lock-context-unfontify-pos next)) | ||
| 361 | |||
| 352 | ;; Fontify the chunk, and mark it as fontified. | 362 | ;; Fontify the chunk, and mark it as fontified. |
| 353 | ;; We mark it first, to make sure that we don't indefinitely | 363 | ;; We mark it first, to make sure that we don't indefinitely |
| 354 | ;; re-execute this fontification if an error occurs. | 364 | ;; re-execute this fontification if an error occurs. |
| @@ -566,9 +576,14 @@ will take place when text is fontified stealthily." | |||
| 566 | ;; Mark the change for deferred contextual refontification. | 576 | ;; Mark the change for deferred contextual refontification. |
| 567 | (when jit-lock-context-unfontify-pos | 577 | (when jit-lock-context-unfontify-pos |
| 568 | (setq jit-lock-context-unfontify-pos | 578 | (setq jit-lock-context-unfontify-pos |
| 579 | ;; Here we use `start' because nothing guarantees that the | ||
| 580 | ;; text between start and end will be otherwise refontified: | ||
| 581 | ;; usually it will be refontified by virtue of being | ||
| 582 | ;; displayed, but if it's outside of any displayed area in the | ||
| 583 | ;; buffer, only jit-lock-context-* will re-fontify it. | ||
| 569 | (min jit-lock-context-unfontify-pos start)))))) | 584 | (min jit-lock-context-unfontify-pos start)))))) |
| 570 | 585 | ||
| 571 | (provide 'jit-lock) | 586 | (provide 'jit-lock) |
| 572 | 587 | ||
| 573 | ;;; arch-tag: 56b5de6e-f581-453b-bb97-49c39372ff9e | 588 | ;; arch-tag: 56b5de6e-f581-453b-bb97-49c39372ff9e |
| 574 | ;;; jit-lock.el ends here | 589 | ;;; jit-lock.el ends here |