[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode f8d94cb 229/486: Use catch and throw instead of
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode f8d94cb 229/486: Use catch and throw instead of block and return |
Date: |
Sat, 7 Aug 2021 09:25:25 -0400 (EDT) |
branch: elpa/rust-mode
commit f8d94cb53cdfc22cf715edd16cf0f0f8fadffbf3
Author: Matt Kraai <kraai@ftbfs.org>
Commit: Matt Kraai <kraai@ftbfs.org>
Use catch and throw instead of block and return
Fixes #130
---
rust-mode.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/rust-mode.el b/rust-mode.el
index 56b356d..fdde64f 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -14,7 +14,6 @@
;;; Code:
(eval-when-compile (require 'rx)
- (require 'cl)
(require 'compile)
(require 'url-vars))
@@ -541,17 +540,18 @@ function or trait. When nil, where will be aligned with
fn or trait."
"Matches names like \"foo::\" or \"Foo::\" (depending on RE-IDENT, which
should match
the desired identifiers), but does not match type annotations \"foo::<\"."
`(lambda (limit)
- (block nil
+ (catch 'rust-path-font-lock-matcher
(while t
(let* ((symbol-then-colons (rx-to-string '(seq (group (regexp
,re-ident)) "::")))
(match (re-search-forward symbol-then-colons limit t)))
(cond
;; If we didn't find a match, there are no more occurrences
;; of foo::, so return.
- ((null match) (return nil))
+ ((null match) (throw 'rust-path-font-lock-matcher nil))
;; If this isn't a type annotation foo::<, we've found a
;; match, so a return it!
- ((not (looking-at (rx (0+ space) "<"))) (return match))))))))
+ ((not (looking-at (rx (0+ space) "<")))
+ (throw 'rust-path-font-lock-matcher match))))))))
(defvar rust-mode-font-lock-keywords
(append
- [nongnu] elpa/rust-mode ce976b9 145/486: Fix "-> Type" on a single line indentation, (continued)
- [nongnu] elpa/rust-mode ce976b9 145/486: Fix "-> Type" on a single line indentation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f2f4d67 158/486: Merge pull request #59 from lunaryorn/fix-byte-compiler-warnings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ddf45ed 146/486: Use (goto-char (point-max)) instead of (end-of-buffer) to silence warning., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0077bbf 160/486: Fix package.el URL, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 86db9bd 166/486: Merge pull request #65 from tromey/blink-matching-paren, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 53c558c 175/486: Factor out rust-conditional-re-search-forward, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5231709 177/486: Speed up calls to "looking-back", ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c801dda 197/486: Merge pull request #77 from tromey/fix-byte-compiler-add-lexbind, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode cdaf3fc 201/486: Update MELPA URL, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 1761a9c 204/486: Merge pull request #105 from MicahChalmer/remove-misc, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f8d94cb 229/486: Use catch and throw instead of block and return,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 40c33fd 250/486: add code to handle new-style rustc errors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c69adaf 254/486: Add menu titles for items in imenu, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode dae5af7 298/486: Merge pull request #198 from tromey/indentation-fix, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode bfe4056 452/486: Re-implement rust-in-macro for performance, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode eaf95af 210/486: Merge pull request #111 from mrBliss/where-indentation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2540d7e 262/486: Go back to the current line and column after formatting., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 52870b6 203/486: Remove unused require of misc.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 95d089c 211/486: Merge pull request #110 from mrBliss/fix-103, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 00e5366 224/486: Merge pull request #122 from kraai/remove-duplicate-keywords, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0601540 205/486: Merge pull request #96 from MicahChalmer/add-licenses, ELPA Syncer, 2021/08/07