diff options
| author | Alan Mackenzie | 2015-03-20 15:39:37 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2015-03-20 15:39:37 +0000 |
| commit | 932d0fdb4fb217adb4e894b595c2294abc4fef3e (patch) | |
| tree | 48eb3e014d1d2985d8b7465feab5702f886a7ee0 | |
| parent | 1fcc552ac27503c502a9a6e6cf06268e6018db51 (diff) | |
| download | emacs-932d0fdb4fb217adb4e894b595c2294abc4fef3e.tar.gz emacs-932d0fdb4fb217adb4e894b595c2294abc4fef3e.zip | |
Fix debbugs#20146
* font-lock.el (font-lock-extend-jit-lock-region-after-change):
Return the calculated values, as per spec.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/font-lock.el | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ac99cd5ec39..cecec469ed8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2015-03-20 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | Fix debbugs#20146 | ||
| 4 | |||
| 5 | * font-lock.el (font-lock-extend-jit-lock-region-after-change): | ||
| 6 | Return the calculated values, as per spec. | ||
| 7 | |||
| 1 | 2015-03-20 Dmitry Gutov <dgutov@yandex.ru> | 8 | 2015-03-20 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 9 | ||
| 3 | * progmodes/ruby-mode.el (ruby-font-lock-keywords): Move `at_exit' | 10 | * progmodes/ruby-mode.el (ruby-font-lock-keywords): Move `at_exit' |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 6ec6c9f1196..1838a0f02b4 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1325,11 +1325,13 @@ This function does 2 things: | |||
| 1325 | (when (memq 'font-lock-extend-region-wholelines | 1325 | (when (memq 'font-lock-extend-region-wholelines |
| 1326 | font-lock-extend-region-functions) | 1326 | font-lock-extend-region-functions) |
| 1327 | (goto-char beg) | 1327 | (goto-char beg) |
| 1328 | (setq jit-lock-start (min jit-lock-start (line-beginning-position))) | 1328 | (setq beg (min jit-lock-start (line-beginning-position))) |
| 1329 | (goto-char end) | 1329 | (goto-char end) |
| 1330 | (setq jit-lock-end | 1330 | (setq end |
| 1331 | (max jit-lock-end | 1331 | (max jit-lock-end |
| 1332 | (if (bolp) (point) (line-beginning-position 2)))))))) | 1332 | (if (bolp) (point) (line-beginning-position 2))))) |
| 1333 | (setq jit-lock-start beg | ||
| 1334 | jit-lock-end end)))) | ||
| 1333 | 1335 | ||
| 1334 | (defun font-lock-fontify-block (&optional arg) | 1336 | (defun font-lock-fontify-block (&optional arg) |
| 1335 | "Fontify some lines the way `font-lock-fontify-buffer' would. | 1337 | "Fontify some lines the way `font-lock-fontify-buffer' would. |