[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 6e9e60b 327/352: Fix forloop matching on == ins
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode 6e9e60b 327/352: Fix forloop matching on == instead of = (#105) |
Date: |
Sun, 29 Aug 2021 11:23:11 -0400 (EDT) |
branch: elpa/julia-mode
commit 6e9e60b2c75b68d379428a45b129c86de0967a2e
Author: Adam B <adam_gpg@thebeckmeyers.xyz>
Commit: GitHub <noreply@github.com>
Fix forloop matching on == instead of = (#105)
Fix #104
---
julia-mode-tests.el | 8 +++++++-
julia-mode.el | 9 +++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/julia-mode-tests.el b/julia-mode-tests.el
index 09b8e13..9187731 100644
--- a/julia-mode-tests.el
+++ b/julia-mode-tests.el
@@ -490,7 +490,13 @@ end")
(julia--should-font-lock string 10 font-lock-keyword-face))
(let ((string "(i for i in 1:10)"))
(julia--should-font-lock string 4 font-lock-keyword-face)
- (julia--should-font-lock string 10 font-lock-keyword-face)))
+ (julia--should-font-lock string 10 font-lock-keyword-face))
+ (let ((string "[i for i ∈ 1:15 if w(i) == 15]"))
+ (julia--should-font-lock string 4 font-lock-keyword-face)
+ (julia--should-font-lock string 10 font-lock-keyword-face)
+ (julia--should-font-lock string 17 font-lock-keyword-face)
+ (julia--should-font-lock string 25 nil)
+ (julia--should-font-lock string 26 nil)))
;;; Movement
(ert-deftest julia--test-beginning-of-defun-assn-1 ()
diff --git a/julia-mode.el b/julia-mode.el
index 9f7234d..57c2874 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -200,8 +200,13 @@
].* \\(in\\)\\(\\s-\\|$\\)+")
(defconst julia--forloop-=-regex
- "for +.*[^
-].*\\(=\\|∈\\)")
+ (rx "for"
+ (1+ ? )
+ ;; expression can't end and no newline before = portion of forloop.
+ (1+ (not (any ?\n ?\; ?=)))
+ (group (any ?= ?∈))
+ ;; don't want to match on == expression instead of =.
+ (not (any ?=))))
(defconst julia-ternary-regex
" +\\(\\?\\)[
- [nongnu] elpa/julia-mode 2486d1e 247/352: Replace {UTF8, ASCII, Byte}String with String, (continued)
- [nongnu] elpa/julia-mode 2486d1e 247/352: Replace {UTF8, ASCII, Byte}String with String, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d3366f4 250/352: Added using, fixed bugs, added tests., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 0e3217f 243/352: Enable travis on emacs23, emacs24, emacs-snapshot., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c9d8ca6 265/352: Fix backslash character class., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 46d2469 272/352: Merge pull request #39 from rfourquet/rf/where, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode cb41ae0 303/352: Add unit tests for LaTeX substitution., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode df2ab77 319/352: test on Emacs25, simplify setup code (#95), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 5238f9a 323/352: Increase lookback. (#98), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 7de3b0c 330/352: Remove highlighting for :: and <:. (#112), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 1c122f1 328/352: Fix multiple type face highlighting. Add tests. (#110), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 6e9e60b 327/352: Fix forloop matching on == instead of = (#105),
ELPA Syncer <=
- [nongnu] elpa/julia-mode ac22747 178/352: remove trailing ws from repo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c3d3e3a 182/352: Don't call parse-partial-sexp to find the last opening paren., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c45c786 335/352: Add more tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 549a7b4 341/352: Remove C_NULL from constants and add Cvoid, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 13a3c53 344/352: Merge branch 'master' into triple-quote-cmd, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ac7431c 174/352: Mark @ and ! as a symbol constituents, as suggested by @Clemens-H., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ac55340 175/352: Factoring out a types regex., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d96a08c 180/352: Refactoring julia-char-regex as an rx form., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 76d5d75 183/352: Optimising julia-at-keyword., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9cdad57 187/352: Make julia-char-regex stricter., ELPA Syncer, 2021/08/29