[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode f3f2ad1 198/352: Highlight triple quoted string
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode f3f2ad1 198/352: Highlight triple quoted strings. |
Date: |
Sun, 29 Aug 2021 11:22:44 -0400 (EDT) |
branch: elpa/julia-mode
commit f3f2ad18229e7194d28ca83edca010766037ac7a
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Yichao Yu <yyc1992@gmail.com>
Highlight triple quoted strings.
---
julia-mode.el | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/julia-mode.el b/julia-mode.el
index 1fa44ca..7bb8676 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -114,6 +114,18 @@ This function provides equivalent functionality, but makes
no efforts to optimis
"\\\\"))
(group "'")))
+(defconst julia-triple-quoted-string-regex
+ ;; We deliberately put a group on the first and last delimiter, so
+ ;; we can mark these as string delimiters for font-lock.
+ (rx (group "\"")
+ (group "\"\""
+ ;; After the delimiter, we're a sequence of
+ ;; non-backslashes or blackslashes paired with something.
+ (*? (or (not (any "\\"))
+ (seq "\\" anything)))
+ "\"\"")
+ (group "\"")))
+
(defconst julia-unquote-regex
"\\(\\s(\\|\\s-\\|-\\|[,%=<>\\+*/?&|!\\^~\\\\;:]\\|^\\)\\($[a-zA-Z0-9_]+\\)")
@@ -391,10 +403,14 @@ before point. Returns nil if we're not within nested
parens."
(set (make-local-variable 'font-lock-defaults) '(julia-font-lock-keywords))
(set (make-local-variable 'font-lock-syntactic-keywords)
(list
- `(,julia-char-regex
+ `(,julia-char-regex
(1 "\"") ; Treat ' as a string delimiter.
(2 ".") ; Don't highlight anything between the open and close '.
- (3 "\"")) ; Treat the close ' as a string delimiter.
+ (3 "\"")); Treat the close ' as a string delimiter.
+ `(,julia-triple-quoted-string-regex
+ (1 "\"") ; Treat the first " in """ as a string delimiter.
+ (2 ".") ; Don't highlight anything between.
+ (3 "\"")) ; Treat the last " in """ as a string delimiter.
))
(set (make-local-variable 'indent-line-function) 'julia-indent-line)
(set (make-local-variable 'julia-basic-offset) 4)
- [nongnu] elpa/julia-mode 8449c95 295/352: Merge pull request #69 from emmt/master, (continued)
- [nongnu] elpa/julia-mode 8449c95 295/352: Merge pull request #69 from emmt/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 47d2fb0 282/352: Merge pull request #51 from non-Jedi/arg-list, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode e27e6d2 290/352: fix compilation error, silence byte-compiler warnings in emacs>23, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 7102542 304/352: fix tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 646f758 156/352: Don't skip over end keywords., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 11e3904 176/352: Backporting regexp-opt functionality to Emacs 23., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 36aa038 181/352: Fix julia-in-brackets so it isn't confused by strings, characters or comments., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d7a7607 184/352: Make julia-last-open-block-pos a pure function that only returns the position., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 3597e9a 186/352: Comment improvements., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 6603c79 190/352: rename Uint -> UInt in contrib files for syntax highlighting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode f3f2ad1 198/352: Highlight triple quoted strings.,
ELPA Syncer <=
- [nongnu] elpa/julia-mode 65cfc0d 201/352: julia-mode.el: add a bunch of builtin types, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode fabafad 200/352: julia-mode.el: improve matching of function assignment syntax, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 4b41b85 207/352: julia-mode.el: `f(x) == something` does not define a function, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a37d541 214/352: Changed input from TeX mode to use Julia unicode input, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 2e72a0b 213/352: Removed (setq comint-proccess-echoes t) from contrib/julia-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 716d58c 217/352: Added autoload cookie to inferior-julia function in contrib/julia-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b1e02f1 230/352: rename: FloatingPoint => AbstractFloat, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 0583ee3 232/352: String was renamed to AbstractString, replace everywhere, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 4afb7be 229/352: Update mailmap., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode e7c8550 228/352: Bind indent offset to its standard value for tests, ELPA Syncer, 2021/08/29