[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 6b7e956 321/352: Fix for derived parent mode (#
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode 6b7e956 321/352: Fix for derived parent mode (#66) |
Date: |
Sun, 29 Aug 2021 11:23:10 -0400 (EDT) |
branch: elpa/julia-mode
commit 6b7e956745a78df342e0e87a313dd4a91524df78
Author: yuhan0 <qythium@gmail.com>
Commit: Tamas K. Papp <tkpapp@gmail.com>
Fix for derived parent mode (#66)
* Derive julia-mode directly from prog-mode
Note: this drops compatibility with Emacs 23 and solves a bug with
(derived-mode-p 'prog-mode) returning nil
* Remove Emacs 23 compatibilty check for syntax-propertize-function
---
julia-mode.el | 39 ++++++++++-----------------------------
1 file changed, 10 insertions(+), 29 deletions(-)
diff --git a/julia-mode.el b/julia-mode.el
index c0dfdb4..b6f7b53 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -367,14 +367,13 @@ Based on `python-syntax-stringify'."
'syntax-table (string-to-syntax "|"))))))
(defconst julia-syntax-propertize-function
- (unless (< emacs-major-version 24)
- (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.
+ (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 (&optional syntax-ppss)
"Return non-nil if point is inside a comment using SYNTAX-PPSS.
@@ -635,11 +634,6 @@ meaning always increase indent on TAB and decrease on
S-TAB."
(when (>= point-offset 0)
(move-to-column (+ (current-indentation) point-offset)))))
-(defalias 'julia-mode-prog-mode
- (if (fboundp 'prog-mode)
- 'prog-mode
- 'fundamental-mode))
-
;;; Navigation
;; based off python.el
@@ -781,27 +775,14 @@ Return nil if point is not in a function, otherwise
point."
))
;;;###autoload
-(define-derived-mode julia-mode julia-mode-prog-mode "Julia"
+(define-derived-mode julia-mode prog-mode "Julia"
"Major mode for editing julia code."
(set-syntax-table julia-mode-syntax-table)
(set (make-local-variable 'comment-start) "# ")
(set (make-local-variable 'comment-start-skip) "#+\\s-*")
(set (make-local-variable 'font-lock-defaults) '(julia-font-lock-keywords))
- (if (< emacs-major-version 24)
- ;; Emacs 23 doesn't have syntax-propertize-function
- (set (make-local-variable 'font-lock-syntactic-keywords)
- (list
- `(,julia-char-regex
- (1 "\"") ; Treat ' as a string delimiter.
- (2 ".") ; Don't highlight anything between the open and close '.
- (3 "\"")) ; Treat the close ' as a string delimiter.
- `(,julia-triple-quoted-string-regex
- (1 "\"") ; Treat the first " in """ as a string delimiter.
- (2 ".") ; Don't highlight anything between.
- (3 "\"")))) ; Treat the last " in """ as a string delimiter.
- ;; Emacs 24 and later has syntax-propertize-function, so use that instead.
- (set (make-local-variable 'syntax-propertize-function)
- julia-syntax-propertize-function))
+ (set (make-local-variable 'syntax-propertize-function)
+ julia-syntax-propertize-function)
(set (make-local-variable 'indent-line-function) 'julia-indent-line)
(set (make-local-variable 'beginning-of-defun-function)
#'julia-beginning-of-defun)
(set (make-local-variable 'end-of-defun-function) #'julia-end-of-defun)
- [nongnu] elpa/julia-mode 483805b 257/352: Merge pull request #29 from nverno/master, (continued)
- [nongnu] elpa/julia-mode 483805b 257/352: Merge pull request #29 from nverno/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9f990bb 281/352: Handle string escapes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 2ef6992 278/352: Fixed import export etc indentation at start of buffer. (#47), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 117b791 294/352: Replace `Associative` by `AbstractDict` (thanks to @tpapp), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode dc21978 289/352: Merge pull request #63 from nverno/movement-functions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 61e22f6 312/352: Merge pull request #90 from tpapp/tp/add-melpa-badge, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a174d0e 315/352: Fix indentation of generated elisp, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 97325c4 318/352: Merge pull request #87 from tpapp/tp/drop-emacs-23, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 0eec10a 333/352: Do not consider `:end` as block ending, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c9d8230 329/352: Give \ punctuation syntax outside of strings (#113), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 6b7e956 321/352: Fix for derived parent mode (#66),
ELPA Syncer <=
- [nongnu] elpa/julia-mode 9dcabbc 334/352: Simplify the logic to find the end of last block, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 796ddfd 338/352: Apply proper syntax to triple-quoted cmds, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 505d71b 339/352: Add all problemmatic strings from issue #15 to tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b800403 326/352: Font lock tweaks (#102), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 8bfc709 325/352: bump version for release, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a31868d 340/352: font-lock ccall as a builtin, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a4eeb6c 343/352: Merge pull request #134 from non-Jedi/font-lock-builtin-face, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a1ba9a0 352/352: add logo, README tweaks, add section on testing (#163), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode dc17943 351/352: Indent imports from submodule correctly (#154), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode af5eb63 273/352: short function syntax: support return type declaration, ELPA Syncer, 2021/08/29