Skip to content

Commit 3304c0f

Browse files
committed
Spped up fontification of built-ins
1 parent a2ab8ff commit 3304c0f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

swift-mode-font-lock.el

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,15 @@ The predicate MATCH-P is called with two arguments:
473473
- the limit of search functions."
474474
(let ((result nil))
475475
(while (and
476-
(< (point) limit)
476+
(progn
477+
(dolist (key '(swift-mode:comment
478+
swift-mode:string
479+
swift-mode:regexp))
480+
(when (get-text-property (point) key)
481+
(goto-char (next-single-property-change
482+
(point)
483+
key nil limit))))
484+
(< (point) limit))
477485
(not result)
478486
(re-search-forward "\\_<\\(?:\\sw\\|\\s_\\)+\\_>" limit t))
479487
(when (save-excursion

0 commit comments

Comments
 (0)