Skip to content

Commit c61db49

Browse files
committed
Modify syntax entry when php-mode-use-php7-syntax-table
1 parent 7f0cbc3 commit c61db49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

php-mode.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,8 +1124,6 @@ After setting the stylevars run hooks according to STYLENAME
11241124
(modify-syntax-entry ?_ "_" table)
11251125
(modify-syntax-entry ?` "\"" table)
11261126
(modify-syntax-entry ?\" "\"" table)
1127-
(modify-syntax-entry ?# "< b" table)
1128-
(modify-syntax-entry ?\n "> b" table)
11291127
(modify-syntax-entry ?$ "_" table)
11301128
table))
11311129

@@ -1171,6 +1169,10 @@ After setting the stylevars run hooks according to STYLENAME
11711169
;; PHP vars are case-sensitive
11721170
(setq case-fold-search t)
11731171

1172+
(when php-mode-use-php7-syntax-table
1173+
(modify-syntax-entry ?# "< b" php-mode-syntax-table)
1174+
(modify-syntax-entry ?\n "> b" php-mode-syntax-table))
1175+
11741176
(when php-mode-enable-project-local-variable
11751177
(add-hook 'hack-local-variables-hook #'php-mode-set-local-variable-delay t t))
11761178

0 commit comments

Comments
 (0)