(defun php-syntax-propertize-function (start end)
"Apply propertize rules from START to END."
(goto-char start)
(while (and (< (point) end)
(re-search-forward php-heredoc-start-re end t)
)
(php-heredoc-syntax))
(goto-char start)
(while (re-search-forward "['\"]" end t)
(when (php-in-comment-p)
(c-put-char-property (match-beginning 0)
'syntax-table (string-to-syntax "_"))))
(funcall
(syntax-propertize-rules
("\\(\"\\)\\(\\\\.\\|[^\"\n\\]\\)*\\(\"\\)" (1 "\"") (3 "\""))
("\\('\\)\\(\\\\.\\|[^'\n\\]\\)*\\('\\)" (1 "\"") (3 "\"")))
start end))
做高亮的。看來你不需要這個。
貌似也没什么差别, 高亮还是有
有些大文件5000行以上的, 复制,粘贴保存一下, 都要10多20秒, profiler-report 后看到是因为这个函数, 就想注释掉看看…