diff options
| -rw-r--r-- | lisp/font-lock.el | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index b4cf5b0387d..f50a7150aad 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1093,14 +1093,9 @@ accessible portion of the current buffer." | |||
| 1093 | (or beg (point-min)) (or end (point-max))))) | 1093 | (or beg (point-min)) (or end (point-max))))) |
| 1094 | 1094 | ||
| 1095 | (defvar font-lock-ensure-function | 1095 | (defvar font-lock-ensure-function |
| 1096 | (lambda (_beg _end) | 1096 | (lambda (beg end) |
| 1097 | (unless font-lock-fontified | 1097 | (unless font-lock-fontified |
| 1098 | (font-lock-default-fontify-buffer) | 1098 | (font-lock-fontify-region beg end))) |
| 1099 | (unless font-lock-mode | ||
| 1100 | ;; If font-lock is not enabled, we don't have the hooks in place to | ||
| 1101 | ;; track modifications, so a subsequent call to font-lock-ensure can't | ||
| 1102 | ;; assume that the fontification is still valid. | ||
| 1103 | (setq font-lock-fontified nil)))) | ||
| 1104 | "Function to make sure a region has been fontified. | 1099 | "Function to make sure a region has been fontified. |
| 1105 | Called with two arguments BEG and END.") | 1100 | Called with two arguments BEG and END.") |
| 1106 | 1101 | ||