Skip to content

Commit a741209

Browse files
committed
Modify syntax entry when php-mode-use-php7-syntax-table
1 parent f317271 commit a741209

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lisp/php-mode.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,6 @@ After setting the stylevars run hooks according to STYLENAME
11271127
(modify-syntax-entry ?_ "_" table)
11281128
(modify-syntax-entry ?` "\"" table)
11291129
(modify-syntax-entry ?\" "\"" table)
1130-
(modify-syntax-entry ?# "< b" table)
11311130
(modify-syntax-entry ?\n "> b" table)
11321131
(modify-syntax-entry ?$ "_" table)
11331132
table))
@@ -1181,6 +1180,9 @@ After setting the stylevars run hooks according to STYLENAME
11811180
;; PHP vars are case-sensitive
11821181
(setq case-fold-search t)
11831182

1183+
(when php-mode-use-php7-syntax-table
1184+
(modify-syntax-entry ?# "< b" php-mode-syntax-table))
1185+
11841186
(when php-mode-enable-project-local-variable
11851187
(add-hook 'hack-local-variables-hook #'php-mode-set-local-variable-delay t t))
11861188

0 commit comments

Comments
 (0)