diff options
| author | Alan Mackenzie | 2015-02-01 21:20:35 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2015-04-06 22:23:29 +0000 |
| commit | b31d359d182eb252a11f0468a7dc1ee1eafb28e9 (patch) | |
| tree | fb89f830542e34a5636368e3fa71bb3722d2772b | |
| parent | ab9252a01a61d08cc866dfc73dbed95523523556 (diff) | |
| download | emacs-b31d359d182eb252a11f0468a7dc1ee1eafb28e9.tar.gz emacs-b31d359d182eb252a11f0468a7dc1ee1eafb28e9.zip | |
CC Mode: Stop Font Lock forcing fontification from BOL. Fixes debbugs#19669.
cc-mode.el (c-font-lock-init): Setq font-lock-extend-region-functions to
nil.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 70602581cba..38bb8afa15c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2015-02-01 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | CC Mode: Stop Font Lock forcing fontification from BOL. Fixes | ||
| 4 | debbugs#19669. | ||
| 5 | |||
| 6 | * progmodes/cc-mode.el (c-font-lock-init): Setq | ||
| 7 | font-lock-extend-region-functions to nil. | ||
| 8 | |||
| 1 | 2015-04-06 Fabián Ezequiel Gallina <fgallina@gnu.org> | 9 | 2015-04-06 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 10 | ||
| 3 | python.el: Do not break IPython magic completions. (Bug#19736) | 11 | python.el: Do not break IPython magic completions. (Bug#19736) |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 42ee14072d8..d88fe702c59 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -1302,6 +1302,14 @@ This function is called from `c-common-init', once per mode initialization." | |||
| 1302 | (font-lock-mark-block-function | 1302 | (font-lock-mark-block-function |
| 1303 | . c-mark-function))) | 1303 | . c-mark-function))) |
| 1304 | 1304 | ||
| 1305 | ;; Prevent `font-lock-default-fontify-region' extending the region it will | ||
| 1306 | ;; fontify to whole lines by removing `font-lock-extend-region-whole-lines' | ||
| 1307 | ;; (and, coincidentally, `font-lock-extend-region-multiline' (which we do | ||
| 1308 | ;; not need)) from `font-lock-extend-region-functions'. (Emacs only). This | ||
| 1309 | ;; fixes Emacs bug #19669. | ||
| 1310 | (when (boundp 'font-lock-extend-region-functions) | ||
| 1311 | (setq font-lock-extend-region-functions nil)) | ||
| 1312 | |||
| 1305 | (make-local-variable 'font-lock-fontify-region-function) | 1313 | (make-local-variable 'font-lock-fontify-region-function) |
| 1306 | (setq font-lock-fontify-region-function 'c-font-lock-fontify-region) | 1314 | (setq font-lock-fontify-region-function 'c-font-lock-fontify-region) |
| 1307 | 1315 | ||