[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 8a69f69 104/486: Use old code style for emacs 23
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 8a69f69 104/486: Use old code style for emacs 23 compat |
Date: |
Sat, 7 Aug 2021 09:24:58 -0400 (EDT) |
branch: elpa/rust-mode
commit 8a69f69b150f4f38d7d0a1a93d78c50648b5de8f
Author: Micah Chalmer <micah@micahchalmer.net>
Commit: Micah Chalmer <micah@micahchalmer.net>
Use old code style for emacs 23 compat
The new recommended style is to use the "cl-" prefixed versions, but
they do not exist in emacs 23. We still want to stay compatible with
that, so use plain "loop" rather than "cl-loop" to allow the tests to
work with both old and new versions.
ALso "pcase" was introduced in emacs 24, so stop using it to remain
compatible with emacs 23.
---
rust-mode-tests.el | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 54b4524..6aa3528 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -616,7 +616,10 @@ fn indented_already() {
POS-SYMBOL is a symbol found in `rust-test-positions-alist'.
Convert the line-column information from that list into a buffer position
value."
(interactive "P")
- (pcase-let ((`(,line ,column) (cadr (assoc pos-symbol
rust-test-positions-alist))))
+ (let* (
+ (line-and-column (cadr (assoc pos-symbol rust-test-positions-alist)))
+ (line (nth 0 line-and-column))
+ (column (nth 1 line-and-column)))
(save-excursion
(goto-line line)
(move-to-column column)
@@ -844,14 +847,14 @@ All positions are position symbols found in
`rust-test-positions-alist'."
(defun rust-test-group-str-by-face (str)
"Fontify `STR' in rust-mode and group it by face, returning a
list of substrings of `STR' each followed by its face."
- (cl-loop with fontified = (rust-test-fontify-string str)
- for start = 0 then end
- while start
- for end = (next-single-property-change start 'face fontified)
- for prop = (get-text-property start 'face fontified)
- for text = (substring-no-properties fontified start end)
- if prop
- append (list text prop)))
+ (loop with fontified = (rust-test-fontify-string str)
+ for start = 0 then end
+ while start
+ for end = (next-single-property-change start 'face fontified)
+ for prop = (get-text-property start 'face fontified)
+ for text = (substring-no-properties fontified start end)
+ if prop
+ append (list text prop)))
(defun rust-test-font-lock (source face-groups)
"Test that `SOURCE' fontifies to the expected `FACE-GROUPS'"
- [nongnu] elpa/rust-mode 131cebb 055/486: Fix regression of multi-line statement indents, (continued)
- [nongnu] elpa/rust-mode 131cebb 055/486: Fix regression of multi-line statement indents, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b5de342 070/486: Fix typo in emacs ERT test, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode fa51087 057/486: Minor cleanup and formatting tweaks to the rust-mode README, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 4e0a334 081/486: emacs: do not highlight `#foo]` as an attribute, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2d12c3e 072/486: Emacs: always jump the cursor if needed on indent, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5ebe4c7 080/486: emacs: highlight `macro_name!` in macro invocations using [] delimiters, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 76bcb8d 074/486: etc: attempts at fixing editor highlighting for new attribute syntax, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode a59ef8e 090/486: Fix spelling mistakes in comments., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9c0846a 101/486: Add test for '\'' single quote char literal, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 55080f6 100/486: Fix syntax and highlighting for char literals, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8a69f69 104/486: Use old code style for emacs 23 compat,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 9e83b30 110/486: Merge pull request #21 from pnkfelix/tests-allow-override-of-which-emacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 55e7483 113/486: Add a hook so that we briefly highlight the matching `<` when `>` is typed., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 439da40 115/486: disable emacs23 testing on travis., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode d2c6d6c 116/486: Merge pull request #26 from pnkfelix/disable-emacs23-testing, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8c9ea88 127/486: Fix raw string bugs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode a653c6b 123/486: Highlight raw strings correctly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f3e8f20 119/486: Re-enable emacs23 in Travis, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5b73df1 133/486: Fix typo/missing lines in comment in test, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 3a0a727 129/486: Merge pull request #35 from MicahChalmer/fix-raw-string-bugs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c7413e6 130/486: Don't set syntax-begin-function, ELPA Syncer, 2021/08/07