Skip to content

Commit 86eab80

Browse files
committed
Workaround for Emacs 25
We expect that php-syntax-propertize-function is called one time when opening php file. Before emacs 25, it is called. However Emacs 25 optimizes for reducing calling syntax-propertize-function and it is not called at opening php file. So php-mode calls it explicitly in php-mode function.
1 parent a4bd678 commit 86eab80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

php-mode.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,11 @@ PHP heredoc."
10831083
(set (make-local-variable 'defun-prompt-regexp)
10841084
"^\\s-*function\\s-+&?\\s-*\\(\\(\\sw\\|\\s_\\)+\\)\\s-*")
10851085
(set (make-local-variable 'add-log-current-defun-header-regexp)
1086-
php-beginning-of-defun-regexp))
1086+
php-beginning-of-defun-regexp)
1087+
1088+
(when (>= emacs-major-version 25)
1089+
(php-syntax-propertize-function (point-min) (point-max))))
1090+
10871091

10881092
;; Define function name completion function
10891093
(defvar php-completion-table nil

0 commit comments

Comments
 (0)