branch: elpa/julia-mode commit 04b97c4095e7efc0d1bee9feee66b6ca2f2cc68c Merge: 9067194 e22219f Author: Yichao Yu <yyc1...@gmail.com> Commit: GitHub <nore...@github.com>
Merge pull request #37 from tpapp/fix-backslash Fix backslash character class. --- julia-mode-tests.el | 17 +++++++++++++++++ julia-mode.el | 1 + 2 files changed, 18 insertions(+) diff --git a/julia-mode-tests.el b/julia-mode-tests.el index e813657..3a0c8dd 100644 --- a/julia-mode-tests.el +++ b/julia-mode-tests.el @@ -374,6 +374,18 @@ end" end end")) +(ert-deftest julia--test-backslash-indent () + "indentation for function(args...)" + (julia--should-indent + "(\) + 1 + (:\) + 1" + "(\) +1 +(:\) +1")) + (ert-deftest julia--test-indent-keyword-paren () "indentation for ( following keywords" "if( a>0 ) @@ -400,6 +412,11 @@ end") (julia--should-font-lock ":a in keys(Dict(:a=>1))" 1 'julia-quoted-symbol-face)) +(ert-deftest julia--test-symbol-font-locking-after-backslash () + "Even with a \ before the (, it is recognized as matching )." + (let ((string "function \\(a, b)")) + (julia--should-font-lock string (1- (length string)) nil))) + (defun julia--run-tests () (interactive) (if (featurep 'ert) diff --git a/julia-mode.el b/julia-mode.el index 7842739..cd10242 100644 --- a/julia-mode.el +++ b/julia-mode.el @@ -116,6 +116,7 @@ This function provides equivalent functionality, but makes no efforts to optimis (modify-syntax-entry ?< "." table) (modify-syntax-entry ?> "." table) (modify-syntax-entry ?% "." table) + (modify-syntax-entry ?\\ "." table) table) "Syntax table for `julia-mode'.")