emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/julia-mode ba5ba4c 168/352: Highlight function names when


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode ba5ba4c 168/352: Highlight function names when defined with the assignment syntax.
Date: Sun, 29 Aug 2021 11:22:38 -0400 (EDT)

branch: elpa/julia-mode
commit ba5ba4c237f688cb711e4e17aee6fd1a0a41c621
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Yichao Yu <yyc1992@gmail.com>

    Highlight function names when defined with the assignment syntax.
---
 julia-mode.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/julia-mode.el b/julia-mode.el
index 7a52c88..d3932ce 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -113,6 +113,16 @@
       ;; The function name itself
       (group (1+ (or word ?_ ?!)))))
 
+(defconst julia-function-assignment-regex
+  (rx line-start symbol-start
+      (group (1+ (or word ?_ ?!)))
+      (* space)
+      (? "{" (* (not (any "}"))) "}")
+      (* space)
+      "(" (* (not (any ")"))) ")"
+      (* space)
+      "="))
+
 (defconst julia-type-regex
   (rx symbol-start (or "immutable" "type" "abstract") (1+ space) (group (1+ 
(or word ?_)))))
 
@@ -158,6 +168,7 @@
     (list julia-char-regex 2 'font-lock-string-face)
     (list julia-forloop-in-regex 1 'font-lock-keyword-face)
     (list julia-function-regex 1 'font-lock-function-name-face)
+    (list julia-function-assignment-regex 1 'font-lock-function-name-face)
     (list julia-type-regex 1 'font-lock-type-face)
     (list julia-type-annotation-regex 1 'font-lock-type-face)
     ;;(list julia-type-parameter-regex 1 'font-lock-type-face)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]