[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode e29c02f 064/352: making julia indent amount cus
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode e29c02f 064/352: making julia indent amount customizeable as follows: |
Date: |
Sun, 29 Aug 2021 11:22:16 -0400 (EDT) |
branch: elpa/julia-mode
commit e29c02f6105a9ec1aa3efa8176f362fa5aabe184
Author: Jeff Bezanson <bezanson@post.harvard.edu>
Commit: Yichao Yu <yyc1992@gmail.com>
making julia indent amount customizeable as follows:
(add-hook 'julia-mode-hook
'(lambda ()
(setq julia-basic-offset 2)))
---
julia-mode.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/julia-mode.el b/julia-mode.el
index a371110..d2fcad8 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -121,7 +121,7 @@
(and pos
(progn
(goto-char pos)
- (+ 4 (current-indentation))))))
+ (+ julia-basic-offset (current-indentation))))))
; return indent implied by a special form opening on the previous line, if any
(defun form-indent ()
@@ -129,13 +129,13 @@
(end-of-line)
(backward-sexp)
(if (at-keyword julia-block-other-keywords)
- (+ 4 (current-indentation))
+ (+ julia-basic-offset (current-indentation))
(if (char-equal (char-after (point)) ?\()
(progn
(backward-word 1)
(let ((cur (current-indentation)))
(if (at-keyword julia-block-start-keywords)
- (+ 4 cur)
+ (+ julia-basic-offset cur)
nil)))
nil)))
@@ -180,7 +180,7 @@
(forward-to-indentation 0)
(at-keyword julia-block-end-keywords))))
(error2nil (+ (last-open-block (point-min))
- (if endtok -4 0)))))
+ (if endtok (- julia-basic-offset) 0)))))
;; previous line ends in =
(save-excursion
(if (and (not (equal (point-min) (line-beginning-position)))
@@ -188,7 +188,7 @@
(forward-line -1)
(end-of-line) (backward-char 1)
(equal (char-after (point)) ?=)))
- (+ 4 (current-indentation))
+ (+ julia-basic-offset (current-indentation))
nil))
;; take same indentation as previous line
(save-excursion (forward-line -1)
@@ -213,6 +213,7 @@
(list "\\(\"\\(.\\|\\s-\\)*?[^\\\\]\"\\|\"\"\\)" 0
julia-mode-string-syntax-table)))
(set (make-local-variable 'indent-line-function) 'julia-indent-line)
+ (set (make-local-variable 'julia-basic-offset) 4)
(setq indent-tabs-mode nil)
(setq major-mode 'julia-mode)
(setq mode-name "julia")
- [nongnu] elpa/julia-mode e81afbf 054/352: Add Stephan to .mailmap. Welcome, also!, (continued)
- [nongnu] elpa/julia-mode e81afbf 054/352: Add Stephan to .mailmap. Welcome, also!, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode cb0a2a3 066/352: sparse ref() using matmul, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 412cbc8 067/352: Add Jameson to .mailmap and otherwise organize and update it., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 37f4f34 083/352: Update mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 3513e2a 087/352: Update mailmap., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 7daea0a 097/352: Update mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 2eab982 110/352: Update mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 5d4e2ca 030/352: Fix mailmap. Sane now., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ed56114 053/352: Add .mailmap entry for George. Welcome!, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d145e83 063/352: Add StridedMatrix etc. to julia-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode e29c02f 064/352: making julia indent amount customizeable as follows:,
ELPA Syncer <=
- [nongnu] elpa/julia-mode ef7f0a0 061/352: fixing issue #163, indenting with "end" used in indexing, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a4dfa7f 068/352: Mailmap update., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 7815e27 074/352: Update .mailmap., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode fda4b69 100/352: .mailmap updates, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 0db269d 094/352: fixing missing elisp evenp on some systems, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ebfc698 108/352: Mailmap update, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 4f56f2b 115/352: contrib: update instructions for julia-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode bb4f203 122/352: Revert "Merge in changes from ESS' version of julia-mode.el",, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 4c713e1 025/352: adding some thoughts on lightweight threads, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode f75719d 051/352: Update the .mailmap file., ELPA Syncer, 2021/08/29