diff options
| author | Alan Mackenzie | 2016-01-09 15:18:29 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-01-09 15:18:29 +0000 |
| commit | f6117ef754d9b02433dadaf61e72df0d7391e40a (patch) | |
| tree | df7cea2e5ccb1f38e794f879fa828d8c9bed7b6e | |
| parent | 90fd798aacbf92a330cf43d2670479499daf3fb1 (diff) | |
| download | emacs-f6117ef754d9b02433dadaf61e72df0d7391e40a.tar.gz emacs-f6117ef754d9b02433dadaf61e72df0d7391e40a.zip | |
Allow the use of `font-lock-extend-region-multiline' in CC Mode.
* 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.
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 11 |
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) |