diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-02-06 04:51:50 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-02-06 04:51:50 -0500 |
| commit | 351cc916938f13a354f2ffe471bda8eb30765fa3 (patch) | |
| tree | 323f7f813a2c0d450ea4b738a9caa824bf216a7a /rust-mode-tests.el | |
| parent | fd92bfd7fd4e32594c0e0f7dd193fd2d25dd76c2 (diff) | |
| parent | 8a69f69b150f4f38d7d0a1a93d78c50648b5de8f (diff) | |
| download | rust-mode-351cc916938f13a354f2ffe471bda8eb30765fa3.tar.gz | |
Merge pull request #16 from MicahChalmer/add-travis
Add travis config (and make tests runnable on emacs 23)
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el index 2b18728..3ef4cb6 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -628,7 +628,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) @@ -856,14 +859,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'" |
