File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 14
14
; ;; Code:
15
15
16
16
(eval-when-compile (require 'rx )
17
- (require 'cl )
18
17
(require 'compile )
19
18
(require 'url-vars ))
20
19
@@ -541,17 +540,18 @@ function or trait. When nil, where will be aligned with fn or trait."
541
540
" Matches names like \" foo::\" or \" Foo::\" (depending on RE-IDENT, which should match
542
541
the desired identifiers), but does not match type annotations \" foo::<\" ."
543
542
`(lambda (limit)
544
- (block nil
543
+ (catch 'rust-path-font-lock-matcher
545
544
(while t
546
545
(let* ((symbol-then-colons (rx-to-string '(seq (group (regexp , re-ident )) " ::" )))
547
546
(match (re-search-forward symbol-then-colons limit t )))
548
547
(cond
549
548
; ; If we didn't find a match, there are no more occurrences
550
549
; ; of foo::, so return.
551
- ((null match ) (return nil ))
550
+ ((null match ) (throw 'rust-path-font-lock-matcher nil ))
552
551
; ; If this isn't a type annotation foo::<, we've found a
553
552
; ; match, so a return it!
554
- ((not (looking-at (rx (0+ space) " <" ))) (return match ))))))))
553
+ ((not (looking-at (rx (0+ space) " <" )))
554
+ (throw 'rust-path-font-lock-matcher match ))))))))
555
555
556
556
(defvar rust-mode-font-lock-keywords
557
557
(append
You can’t perform that action at this time.
0 commit comments