]> code.delx.au - gnu-emacs/commitdiff
Allow the use of `font-lock-extend-region-multiline' in CC Mode.
authorAlan Mackenzie <acm@muc.de>
Sat, 9 Jan 2016 15:18:29 +0000 (15:18 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 9 Jan 2016 15:18:29 +0000 (15:18 +0000)
* lisp/progmodes/cc-mode.el (c-font-lock-init): Remove
`font-lock-extend-regions-wholelines' from
`font-lock-extend-region-functions' rather than setting the latter to
nil.

lisp/progmodes/cc-mode.el

index 644065911dd5709b29b206fe0de4d14567c7c253..738870b727ae802dbebd1069f5041a2c1bfb193a 100644 (file)
@@ -1336,12 +1336,13 @@ This function is called from `c-common-init', once per mode initialization."
           . c-mark-function)))
 
   ;; Prevent `font-lock-default-fontify-region' extending the region it will
-  ;; fontify to whole lines by removing `font-lock-extend-region-whole-lines'
-  ;; (and, coincidentally, `font-lock-extend-region-multiline' (which we do
-  ;; not need)) from `font-lock-extend-region-functions'.  (Emacs only).  This
-  ;; fixes Emacs bug #19669.
+  ;; fontify to whole lines by removing `font-lock-extend-region-wholelines'
+  ;; from `font-lock-extend-region-functions'.  (Emacs only).  This fixes
+  ;; Emacs bug #19669.
   (when (boundp 'font-lock-extend-region-functions)
-    (setq font-lock-extend-region-functions nil))
+    (setq font-lock-extend-region-functions
+         (delq 'font-lock-extend-region-wholelines
+               font-lock-extend-region-functions)))
 
   (make-local-variable 'font-lock-fontify-region-function)
   (setq font-lock-fontify-region-function 'c-font-lock-fontify-region)