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

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

[nongnu] elpa/julia-mode dd3d682 225/352: Fix Emacs 23 error.


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode dd3d682 225/352: Fix Emacs 23 error.
Date: Sun, 29 Aug 2021 11:22:50 -0400 (EDT)

branch: elpa/julia-mode
commit dd3d6825d667cf8eafe4d860b2c64d80ec6e5030
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Yichao Yu <yyc1992@gmail.com>

    Fix Emacs 23 error.
    
    This constant is only used in Emacs 24+, and `syntax-propertize-rules`
    is not defined in Emacs 23.
---
 julia-mode.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/julia-mode.el b/julia-mode.el
index 7cf2f56..916a274 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -278,14 +278,15 @@ Based on `python-syntax-stringify'."
         (put-text-property string-start-pos (1+ string-start-pos)
                            'syntax-table (string-to-syntax "|"))))))
 
-(defconst julia-syntax-propertize-function
-  (syntax-propertize-rules
-   ("\"\"\""
-    (0 (ignore (julia-stringify-triple-quote))))
-   (julia-char-regex
-    (1 "\"") ; Treat ' as a string delimiter.
-    (2 ".") ; Don't highlight anything between.
-    (3 "\"")))) ; Treat the last " in """ as a string delimiter.
+(unless (< emacs-major-version 24)
+  (defconst julia-syntax-propertize-function
+    (syntax-propertize-rules
+     ("\"\"\""
+      (0 (ignore (julia-stringify-triple-quote))))
+     (julia-char-regex
+      (1 "\"") ; Treat ' as a string delimiter.
+      (2 ".") ; Don't highlight anything between.
+      (3 "\""))))) ; Treat the last " in """ as a string delimiter.
 
 (defun julia-in-comment ()
   "Return non-nil if point is inside a comment.



reply via email to

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