branch: elpa/julia-mode
commit 70d6482755d5eee480b1ee67ce5acfda1ea9b7a5
Author: Wilfred Hughes <m...@wilfred.me.uk>
Commit: Yichao Yu <yyc1...@gmail.com>

    `throw` and `error` are built-in functions that we should highlight.
---
 julia-mode.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/julia-mode.el b/julia-mode.el
index 724b6db..bcfd170 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -131,6 +131,11 @@
      "baremodule" "importall" "immutable")
    'symbols))
 
+(defconst julia-builtin-regex
+  (regexp-opt
+   '("error" "throw")
+   'symbols))
+
 (defconst julia-font-lock-keywords
   (list
    
'("\\<\\(\\|Uint\\(8\\|16\\|32\\|64\\|128\\)\\|Int\\(8\\|16\\|32\\|64\\|128\\)\\|BigInt\\|Integer\\|BigFloat\\|FloatingPoint\\|Float16\\|Float32\\|Float64\\|Complex128\\|Complex64\\|ComplexPair\\|Bool\\|Char\\|DataType\\|Number\\|Real\\|Int\\|Uint\\|Array\\|DArray\\|AbstractArray\\|AbstractVector\\|AbstractMatrix\\|AbstractSparseMatrix\\|SubArray\\|StridedArray\\|StridedVector\\|StridedMatrix\\|VecOrMat\\|StridedVecOrMat\\|DenseArray\\|Range\\|OrdinalRange\\|StepRange\\|UnitRange\\|Fl
 [...]
@@ -150,6 +155,7 @@
     (list julia-type-annotation-regex 1 'font-lock-type-face)
     (list julia-type-parameter-regex 1 'font-lock-type-face)
     (list julia-subtype-regex 1 'font-lock-type-face)
+    (list julia-builtin-regex 1 'font-lock-builtin-face)
 ))
 
 (defconst julia-block-start-keywords

Reply via email to