Skip to content

Commit 0a52b7e

Browse files
committed
Modify syntax entry when php-mode-use-php7-syntax-table
1 parent f892010 commit 0a52b7e

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
@@ -1127,8 +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)
1131-
(modify-syntax-entry ?\n "> b" table)
11321130
(modify-syntax-entry ?$ "_" table)
11331131
table))
11341132

@@ -1181,6 +1179,10 @@ After setting the stylevars run hooks according to STYLENAME
11811179
;; PHP vars are case-sensitive
11821180
(setq case-fold-search t)
11831181

1182+
(when php-mode-use-php7-syntax-table
1183+
(modify-syntax-entry ?# "< b" php-mode-syntax-table)
1184+
(modify-syntax-entry ?\n "> 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)