Skip to content

Commit b0f8636

Browse files
author
fallchildren
committed
set c-before-font-lock-functions to default 't' value to not inherit java's value
this will make the variable more portable through emacs versions Background: java has to function in the variable we do not want: - c-parse-quotes-after-change - c-restore-<>-properties as those are the only ones making java mode differ from the default value we use that instead. The default value (which will be used if no entry is in c-before-font-lock-functions for the used mode) has changed from emacs 24 to master several times and may change in the future. So this solution might spare us a few compability commits in the future.
1 parent 85f52b2 commit b0f8636

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

php-mode.el

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@
6565
;;; Code:
6666

6767
(require 'cc-mode)
68+
(require 'cc-langs)
69+
6870
(eval-when-compile
69-
(require 'cc-langs)
7071
(require 'cc-fonts))
7172

7273
;; Boilerplate from other `cc-mode' derived modes. See
@@ -485,11 +486,7 @@ SYMBOL
485486
php nil)
486487

487488
(c-lang-defconst c-before-font-lock-functions
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))))
489+
php (c-get-lang-constant 'c-before-font-lock-functions nil t))
493490

494491
;; Make php-mode recognize opening tags as preprocessor macro's.
495492
;;

0 commit comments

Comments
 (0)