emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/julia-mode 140369e 337/352: Simplify char-regex


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode 140369e 337/352: Simplify char-regex
Date: Sun, 29 Aug 2021 11:23:14 -0400 (EDT)

branch: elpa/julia-mode
commit 140369ea5dbe0e93bf17510d27f90fb0839ea0a2
Author: Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>
Commit: Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>

    Simplify char-regex
    
    We don't need to apply any syntax to the contents of the 'c' literal.
---
 julia-mode.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/julia-mode.el b/julia-mode.el
index 287b4c3..84fb115 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -113,9 +113,8 @@
             (syntax whitespace)
             bol)
         (group "'")
-        (group
-         (or (repeat 0 8 (not (any "'"))) (not (any "\\"))
-             "\\\\"))
+        (or (repeat 0 8 (not (any "'"))) (not (any "\\"))
+            "\\\\")
         (group "'"))))
 
 (defconst julia-hanging-operator-regexp
@@ -317,9 +316,10 @@
     (0 (unless (nth 3 (save-excursion (syntax-ppss (match-beginning 0))))
          (string-to-syntax "."))))
    (julia-char-regex
-    (1 "\"")                    ; Treat ' as a string delimiter.
-    (2 ".")                     ; Don't highlight anything between.
-    (3 "\"")))) ; Treat the last " in """ as a string delimiter.
+    ;; treat ' in 'c' as string-delimiter
+    (1 "\"")
+    (2 "\""))))
+
 
 (defun julia-in-comment (&optional syntax-ppss)
   "Return non-nil if point is inside a comment using SYNTAX-PPSS.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]