[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 f6117ef: Allow the use of `font-lock-extend-regio
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] emacs-25 f6117ef: Allow the use of `font-lock-extend-region-multiline' in CC Mode. |
Date: |
Sat, 09 Jan 2016 15:17:55 +0000 |
branch: emacs-25
commit f6117ef754d9b02433dadaf61e72df0d7391e40a
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
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.
---
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 6440659..738870b 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."
. 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 f6117ef: Allow the use of `font-lock-extend-region-multiline' in CC Mode.,
Alan Mackenzie <=