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

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

[nongnu] elpa/julia-mode a31868d 340/352: font-lock ccall as a builtin


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode a31868d 340/352: font-lock ccall as a builtin
Date: Sun, 29 Aug 2021 11:23:14 -0400 (EDT)

branch: elpa/julia-mode
commit a31868dc3934c60275830a31a6962835dbf5d973
Author: Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>
Commit: Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>

    font-lock ccall as a builtin
    
    Closes #125
---
 julia-mode-tests.el | 6 ++++++
 julia-mode.el       | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/julia-mode-tests.el b/julia-mode-tests.el
index bafff50..8aa8355 100644
--- a/julia-mode-tests.el
+++ b/julia-mode-tests.el
@@ -532,6 +532,12 @@ end")
     (julia--should-font-lock string 74 font-lock-type-face) ; B
     ))
 
+(ert-deftest julia--test-ccall-font-lock ()
+  (let ((s1 "t = ccall(:clock, Int32, ())"))
+    (julia--should-font-lock s1 5 font-lock-builtin-face)
+    (julia--should-font-lock s1 4 nil)
+    (julia--should-font-lock s1 10 nil)))
+
 ;;; Movement
 (ert-deftest julia--test-beginning-of-defun-assn-1 ()
   "Point moves to beginning of single-line assignment function."
diff --git a/julia-mode.el b/julia-mode.el
index 287b4c3..31831d0 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -248,7 +248,7 @@
 (defconst julia-keyword-regex
   (regexp-opt
    '("if" "else" "elseif" "while" "for" "begin" "end" "quote"
-     "try" "catch" "return" "local" "function" "macro" "ccall"
+     "try" "catch" "return" "local" "function" "macro"
      "finally" "break" "continue" "global" "where"
      "module" "using" "import" "export" "const" "let" "do"
      "baremodule"
@@ -276,6 +276,7 @@
      '("true" "false" "C_NULL" "Inf" "NaN" "Inf32" "NaN32" "nothing" "undef" 
"missing")
      'symbols)
     'font-lock-constant-face)
+   (cons "ccall" 'font-lock-builtin-face)
    (list julia-unquote-regex 2 'font-lock-constant-face)
    (list julia-forloop-in-regex 1 'font-lock-keyword-face)
    (list julia--forloop-=-regex 1 'font-lock-keyword-face)



reply via email to

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