branch: elpa/julia-mode commit b82208b4861aa47f710497ac39ccaa5e8e5d3d38 Author: Jeff Bezanson <bezan...@post.harvard.edu> Commit: Yichao Yu <yyc1...@gmail.com>
use font-lock-constant-face for symbolic constants also for unquote expressions, closing #164 --- julia-mode.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/julia-mode.el b/julia-mode.el index b5fa878..db34000 100644 --- a/julia-mode.el +++ b/julia-mode.el @@ -53,8 +53,11 @@ (defconst julia-char-regex "\\(\\s(\\|\\s-\\|-\\|[,%=<>\\+*/?&|$!\\^~\\\\;:]\\|^\\)\\('\\(\\([^']*?[^\\\\]\\)\\|\\(\\\\\\\\\\)\\)'\\)") +(defconst julia-unquote-regex + "\\(\\s(\\|\\s-\\|-\\|[,%=<>\\+*/?&|!\\^~\\\\;:]\\|^\\)\\($[a-zA-Z0-9_]+\\)") + (defconst julia-font-lock-keywords - (list '("\\<\\(true\\|false\\|\\|Uint\\(8\\|16\\|32\\|64\\)\\|Int\\(8\\|16\\|32\\|64\\)\\|Integer\\|Float\\|Float32\\|Float64\\|Complex128\\|Complex64\\|ComplexNum\\|Bool\\|Char\\|Number\\|Scalar\\|Real\\|Int\\|Uint\\|Array\\|DArray\\|AbstractArray\\|AbstractVector\\|AbstractMatrix\\|SubArray\\|StridedArray\\|StridedVector\\|StridedMatrix\\|VecOrMat\\|StridedVecOrMat\\|Range\\|Range1\\|SparseMatrixCSC\\|Tuple\\|NTuple\\|Buffer\\|Size\\|Index\\|Symbol\\|Function\\|Vector\\|Matrix\\|Unio [...] + (list '("\\<\\(\\|Uint\\(8\\|16\\|32\\|64\\)\\|Int\\(8\\|16\\|32\\|64\\)\\|Integer\\|Float\\|Float32\\|Float64\\|Complex128\\|Complex64\\|ComplexNum\\|Bool\\|Char\\|Number\\|Scalar\\|Real\\|Int\\|Uint\\|Array\\|DArray\\|AbstractArray\\|AbstractVector\\|AbstractMatrix\\|SubArray\\|StridedArray\\|StridedVector\\|StridedMatrix\\|VecOrMat\\|StridedVecOrMat\\|Range\\|Range1\\|SparseMatrixCSC\\|Tuple\\|NTuple\\|Buffer\\|Size\\|Index\\|Symbol\\|Function\\|Vector\\|Matrix\\|Union\\|Type\\|Any\ [...] font-lock-type-face) (cons (concat "\\<\\(" @@ -66,6 +69,8 @@ "module" "import" "export" "const" "let" "bitstype") "\\|") "\\)\\>") 'font-lock-keyword-face) + '("\\<\\(true\\|false\\|C_NULL\\)\\>" . font-lock-constant-face) + (list julia-unquote-regex 2 'font-lock-constant-face) (list julia-char-regex 2 'font-lock-string-face) ;(list julia-string-regex 0 'font-lock-string-face) ))