Skip to content

Commit 40ef9f6

Browse files
author
fallchildren
committed
Fix delayed font-locking issue
Due to a previous refactoring of the font-locking a bug was introduced where font-locking was delayed. This happened because c-before-font-lock-functions did not include the function c-change-expand-fl-region. This commit adds it back to the cc-mode variable, so font-locking will not be delayed. c-depropertize-new-text was introduced in current emacs master (will probably be part of emacs 26?) and c-change-expand-fl-region was introduced in emacs 25. These will be checked before calling c-lang-defconst. Github Issue: #414
1 parent 5598dd3 commit 40ef9f6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

php-mode.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,11 @@ SYMBOL
485485
php nil)
486486

487487
(c-lang-defconst c-before-font-lock-functions
488-
php (if (fboundp #'c-depropertize-new-text)
489-
'(c-depropertize-new-text)
490-
nil))
488+
php (let (functions)
489+
(when (fboundp #'c-change-expand-fl-region)
490+
(cl-pushnew 'c-change-expand-fl-region functions))
491+
(when (fboundp #'c-depropertize-new-text)
492+
(cl-pushnew 'c-depropertize-new-text functions))))
491493

492494
;; Make php-mode recognize opening tags as preprocessor macro's.
493495
;;

0 commit comments

Comments
 (0)