branch: elpa/julia-mode commit a31868dc3934c60275830a31a6962835dbf5d973 Author: Adam Beckmeyer <adam_...@thebeckmeyers.xyz> Commit: Adam Beckmeyer <adam_...@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)