File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -955,9 +955,17 @@ this ^ lineup"
955955
956956(defun php-syntax-propertize-function (start end )
957957 " Apply propertize rules from START to END."
958+ (goto-char start)
959+ (while (and (< (point ) end)
960+ (re-search-forward php-heredoc-start-re end t ))
961+ (php-heredoc-syntax))
962+ (goto-char start)
963+ (while (re-search-forward " ['\" ]" end t )
964+ (when (php-in-comment-p)
965+ (c-put-char-property (match-beginning 0 )
966+ 'syntax-table (string-to-syntax " _" ))))
958967 (funcall
959968 (syntax-propertize-rules
960- (php-heredoc-start-re (0 (ignore (php-heredoc-syntax))))
961969 (" \\ (\" \\ )\\ (\\\\ .\\ |[^\"\n \\ ]\\ )*\\ (\" \\ )" (1 " \" " ) (3 " \" " ))
962970 (" \\ (\' \\ )\\ (\\\\ .\\ |[^\'\n \\ ]\\ )*\\ (\' \\ )" (1 " \" " ) (3 " \" " )))
963971 start end))
@@ -1144,9 +1152,9 @@ After setting the stylevars run hooks according to STYLENAME
11441152 (modify-syntax-entry ?_ " _" php-mode-syntax-table)
11451153 (modify-syntax-entry ?` " \" " php-mode-syntax-table)
11461154 (modify-syntax-entry ?\" " \" " php-mode-syntax-table)
1147- (modify-syntax-entry ?' " \" " php-mode-syntax-table)
11481155 (modify-syntax-entry ?# " < b" php-mode-syntax-table)
11491156 (modify-syntax-entry ?\n " > b" php-mode-syntax-table)
1157+ (modify-syntax-entry ?$ " '" php-mode-syntax-table)
11501158
11511159 (setq-local syntax-propertize-function #'php-syntax-propertize-function )
11521160 (add-to-list (make-local-variable 'syntax-propertize-extend-region-functions )
You can’t perform that action at this time.
0 commit comments