aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/cc-mode.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 644065911dd..738870b727a 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1336,12 +1336,13 @@ This function is called from `c-common-init', once per mode initialization."
1336 . c-mark-function))) 1336 . c-mark-function)))
1337 1337
1338 ;; Prevent `font-lock-default-fontify-region' extending the region it will 1338 ;; Prevent `font-lock-default-fontify-region' extending the region it will
1339 ;; fontify to whole lines by removing `font-lock-extend-region-whole-lines' 1339 ;; fontify to whole lines by removing `font-lock-extend-region-wholelines'
1340 ;; (and, coincidentally, `font-lock-extend-region-multiline' (which we do 1340 ;; from `font-lock-extend-region-functions'. (Emacs only). This fixes
1341 ;; not need)) from `font-lock-extend-region-functions'. (Emacs only). This 1341 ;; Emacs bug #19669.
1342 ;; fixes Emacs bug #19669.
1343 (when (boundp 'font-lock-extend-region-functions) 1342 (when (boundp 'font-lock-extend-region-functions)
1344 (setq font-lock-extend-region-functions nil)) 1343 (setq font-lock-extend-region-functions
1344 (delq 'font-lock-extend-region-wholelines
1345 font-lock-extend-region-functions)))
1345 1346
1346 (make-local-variable 'font-lock-fontify-region-function) 1347 (make-local-variable 'font-lock-fontify-region-function)
1347 (setq font-lock-fontify-region-function 'c-font-lock-fontify-region) 1348 (setq font-lock-fontify-region-function 'c-font-lock-fontify-region)