[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 2843dad 092/352: fix #874
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode 2843dad 092/352: fix #874 |
Date: |
Sun, 29 Aug 2021 11:22:21 -0400 (EDT) |
branch: elpa/julia-mode
commit 2843dad7c9f54a3d5d25b8a86d50c42e19c28f8a
Author: Jeff Bezanson <jeff.bezanson@gmail.com>
Commit: Yichao Yu <yyc1992@gmail.com>
fix #874
---
julia-mode.el | 52 ++++++++++++++++++++++++++--------------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/julia-mode.el b/julia-mode.el
index 1d07d06..1f239d5 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -89,29 +89,29 @@
(defconst julia-block-end-keywords
(list "end" "else" "elseif" "catch"))
-(defun member (item lst)
+(defun julia-member (item lst)
(if (null lst)
nil
(or (equal item (car lst))
- (member item (cdr lst)))))
+ (julia-member item (cdr lst)))))
-(defun find-comment-open (p0)
+(defun julia-find-comment-open (p0)
(if (< (point) p0)
nil
(if (and (equal (char-after (point)) ?#)
- (evenp (strcount
+ (evenp (julia-strcount
(buffer-substring p0 (point)) ?\")))
t
(progn (backward-char 1)
- (find-comment-open p0)))))
+ (julia-find-comment-open p0)))))
-(defun in-comment ()
+(defun julia-in-comment ()
(save-excursion
(end-of-line)
(backward-char 1)
- (find-comment-open (line-beginning-position))))
+ (julia-find-comment-open (line-beginning-position))))
-(defun strcount (str chr)
+(defun julia-strcount (str chr)
(let ((i 0)
(c 0))
(while (< i (length str))
@@ -120,30 +120,30 @@
(setq i (+ i 1)))
c))
-(defun in-brackets ()
+(defun julia-in-brackets ()
(let ((before (buffer-substring (line-beginning-position) (point))))
- (> (strcount before ?[)
- (strcount before ?]))))
+ (> (julia-strcount before ?[)
+ (julia-strcount before ?]))))
-(defun at-keyword (kw-list)
+(defun julia-at-keyword (kw-list)
; not a keyword if used as a field name, X.word, or quoted, :word
(and (or (= (point) 1)
(and (not (equal (char-before (point)) ?.))
(not (equal (char-before (point)) ?:))))
- (not (in-comment))
- (not (in-brackets))
- (member (current-word t) kw-list)))
+ (not (julia-in-comment))
+ (not (julia-in-brackets))
+ (julia-member (current-word t) kw-list)))
; get the position of the last open block
-(defun last-open-block-pos (min)
+(defun julia-last-open-block-pos (min)
(let ((count 0))
(while (not (or (> count 0) (<= (point) min)))
(backward-sexp)
(setq count
- (cond ((at-keyword julia-block-start-keywords)
+ (cond ((julia-at-keyword julia-block-start-keywords)
(+ count 1))
((and (equal (current-word t) "end")
- (not (in-comment)) (not (in-brackets)))
+ (not (julia-in-comment)) (not (julia-in-brackets)))
(- count 1))
(t count))))
(if (> count 0)
@@ -151,8 +151,8 @@
nil)))
; get indent for last open block
-(defun last-open-block (min)
- (let ((pos (last-open-block-pos min)))
+(defun julia-last-open-block (min)
+ (let ((pos (julia-last-open-block-pos min)))
(and pos
(progn
(goto-char pos)
@@ -160,12 +160,12 @@
(defmacro error2nil (body) `(condition-case nil ,body (error nil)))
-(defun paren-indent ()
+(defun julia-paren-indent ()
(let* ((p (parse-partial-sexp (save-excursion
;; only indent by paren if the last open
;; paren is closer than the last open
;; block
- (or (last-open-block-pos (point-min))
+ (or (julia-last-open-block-pos (point-min))
(point-min)))
(progn (beginning-of-line)
(point))))
@@ -180,13 +180,13 @@
; (save-excursion
(end-of-line)
(indent-line-to
- (or (save-excursion (error2nil (paren-indent)))
+ (or (save-excursion (error2nil (julia-paren-indent)))
(save-excursion
(let ((endtok (progn
(beginning-of-line)
(forward-to-indentation 0)
- (at-keyword julia-block-end-keywords))))
- (error2nil (+ (last-open-block (point-min))
+ (julia-at-keyword julia-block-end-keywords))))
+ (error2nil (+ (julia-last-open-block (point-min))
(if endtok (- julia-basic-offset) 0)))))
;; previous line ends in =
(save-excursion
@@ -201,7 +201,7 @@
(save-excursion (forward-line -1)
(current-indentation))
0))
- (when (at-keyword julia-block-end-keywords)
+ (when (julia-at-keyword julia-block-end-keywords)
(forward-word 1)))
(defun julia-mode ()
- [nongnu] elpa/julia-mode 946222c 042/352: Trying multiplication of darrays, (continued)
- [nongnu] elpa/julia-mode 946222c 042/352: Trying multiplication of darrays, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 833dae5 049/352: Update mailmap., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 38ad5c0 060/352: Mailmap entry for Stephan., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 27ecdc5 047/352: fixing julia-mode; I used (do ...) and apparently not all emacs installs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 42a61fc 057/352: Add Giuseppe to the .mailmap file., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9553095 059/352: New entry in .mailmap for Jeff., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a04be67 071/352: of course, all my tree compressing broke file/line metadata. fix, and make the info easier to access too., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 91b2800 075/352: Color ccall and C_NULL in emacs mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b82208b 076/352: use font-lock-constant-face for symbolic constants, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 419dfd9 090/352: fix to "in" syntax highlighting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 2843dad 092/352: fix #874,
ELPA Syncer <=
- [nongnu] elpa/julia-mode db9a18c 102/352: .mailmap: some additions to dedup contributors in gitlog, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 44cd797 116/352: Update mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 7064885 113/352: update mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 137455a 119/352: Update mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode db05511 143/352: Adding autoload cookie for associating .jl files with julia-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d6a298b 146/352: Removing unused constant., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 1b6b38c 154/352: Don't highlight that that happens to contain a constant., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 45e1650 159/352: Correcting type regex., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b6b52a4 162/352: tweaks to emacs syntax highlighting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode fdaa84d 163/352: emacs requires \Unnnnn unicode escapes to be padded to 8 hex digits, ELPA Syncer, 2021/08/29