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

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

[nongnu] elpa/julia-mode a4eeb6c 343/352: Merge pull request #134 from n


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode a4eeb6c 343/352: Merge pull request #134 from non-Jedi/font-lock-builtin-face
Date: Sun, 29 Aug 2021 11:23:15 -0400 (EDT)

branch: elpa/julia-mode
commit a4eeb6ca594c4a9239270feb3db15227a2545c00
Merge: d69b095 549a7b4
Author: Tamas K. Papp <tkpapp@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #134 from non-Jedi/font-lock-builtin-face
    
    font-lock ccall as builtin
---
 julia-mode-tests.el | 6 ++++++
 julia-mode.el       | 6 ++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

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 424bdff..155df80 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"
@@ -273,9 +273,11 @@
    (cons julia-macro-regex ''julia-macro-face)
    (cons
     (regexp-opt
-     '("true" "false" "C_NULL" "Inf" "NaN" "Inf32" "NaN32" "nothing" "undef" 
"missing")
+     ;; constants defined in Core plus true/false
+     '("true" "false" "Cvoid" "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]