[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode d7a7607 184/352: Make julia-last-open-block-pos
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode d7a7607 184/352: Make julia-last-open-block-pos a pure function that only returns the position. |
Date: |
Sun, 29 Aug 2021 11:22:41 -0400 (EDT) |
branch: elpa/julia-mode
commit d7a76075508e2e445ef9440c28c774cc27cd038d
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Yichao Yu <yyc1992@gmail.com>
Make julia-last-open-block-pos a pure function that only returns the
position.
---
julia-mode.el | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/julia-mode.el b/julia-mode.el
index cac3f03..7dfc292 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -295,21 +295,23 @@ a keyword if used as a field name, X.word, or quoted,
:word."
(ignore-errors (backward-char))))
(defun julia-last-open-block-pos (min)
- "Move back and return the position of the last open block, if one found.
+ "Return the position of the last open block, if one found.
Do not move back beyond position MIN."
- (let ((count 0))
- (while (not (or (> count 0) (<= (point) min)))
- (julia-safe-backward-sexp)
- (setq count
- (cond ((julia-at-keyword julia-block-start-keywords)
- (+ count 1))
- ((and (equal (current-word t) "end")
- (not (julia-in-comment)) (not (julia-in-brackets)))
- (- count 1))
- (t count))))
- (if (> count 0)
- (point)
- nil)))
+ (save-excursion
+ (let ((count 0))
+ (while (not (or (> count 0) (<= (point) min)))
+ (julia-safe-backward-sexp)
+ (setq count
+ (cond ((julia-at-keyword julia-block-start-keywords)
+ (+ count 1))
+ ;; fixme: breaks on strings
+ ((and (equal (current-word t) "end")
+ (not (julia-in-comment)) (not (julia-in-brackets)))
+ (- count 1))
+ (t count))))
+ (if (> count 0)
+ (point)
+ nil))))
(defun julia-last-open-block (min)
"Move back and return indentation level for last open block.
- [nongnu] elpa/julia-mode 847908e 249/352: Add indent for import and export., (continued)
- [nongnu] elpa/julia-mode 847908e 249/352: Add indent for import and export., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 7b1d3fb 253/352: Merge pull request #21 from kshramt/python-paren-indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode f591c6d 275/352: Merge pull request #41 from rfourquet/rf/where-return, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 8449c95 295/352: Merge pull request #69 from emmt/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 47d2fb0 282/352: Merge pull request #51 from non-Jedi/arg-list, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode e27e6d2 290/352: fix compilation error, silence byte-compiler warnings in emacs>23, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 7102542 304/352: fix tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 646f758 156/352: Don't skip over end keywords., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 11e3904 176/352: Backporting regexp-opt functionality to Emacs 23., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 36aa038 181/352: Fix julia-in-brackets so it isn't confused by strings, characters or comments., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d7a7607 184/352: Make julia-last-open-block-pos a pure function that only returns the position.,
ELPA Syncer <=
- [nongnu] elpa/julia-mode 3597e9a 186/352: Comment improvements., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 6603c79 190/352: rename Uint -> UInt in contrib files for syntax highlighting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode f3f2ad1 198/352: Highlight triple quoted strings., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 65cfc0d 201/352: julia-mode.el: add a bunch of builtin types, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode fabafad 200/352: julia-mode.el: improve matching of function assignment syntax, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 4b41b85 207/352: julia-mode.el: `f(x) == something` does not define a function, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode a37d541 214/352: Changed input from TeX mode to use Julia unicode input, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 2e72a0b 213/352: Removed (setq comint-proccess-echoes t) from contrib/julia-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 716d58c 217/352: Added autoload cookie to inferior-julia function in contrib/julia-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b1e02f1 230/352: rename: FloatingPoint => AbstractFloat, ELPA Syncer, 2021/08/29