branch: elpa/julia-mode
commit c9d8ca6d86c11b9e6cb5a9ee34eb2dfe9af23a23
Author: Tamas K. Papp <tkp...@gmail.com>
Commit: Tamas K. Papp <tkp...@gmail.com>

    Fix backslash character class.
    
    With tests. Fixes #17.
---
 julia-mode-tests.el | 5 +++++
 julia-mode.el       | 1 +
 2 files changed, 6 insertions(+)

diff --git a/julia-mode-tests.el b/julia-mode-tests.el
index e813657..d480e6b 100644
--- a/julia-mode-tests.el
+++ b/julia-mode-tests.el
@@ -400,6 +400,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'.")
 

Reply via email to