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

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

[nongnu] elpa/julia-mode 27ecdc5 047/352: fixing julia-mode; I used (do


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode 27ecdc5 047/352: fixing julia-mode; I used (do ...) and apparently not all emacs installs
Date: Sun, 29 Aug 2021 11:22:13 -0400 (EDT)

branch: elpa/julia-mode
commit 27ecdc5409c8cc8939541d7704c92d65e33a94a6
Author: Jeff Bezanson <bezanson@post.harvard.edu>
Commit: Yichao Yu <yyc1992@gmail.com>

    fixing julia-mode; I used (do ...) and apparently not all emacs installs
    have it
---
 julia-mode.el | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/julia-mode.el b/julia-mode.el
index f217f32..c76ddc5 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -86,18 +86,19 @@
 
 ; get the position of the last open block
 (defun last-open-block-pos (min)
-  (do ((count 0
-             (cond ((at-keyword julia-block-start-keywords)
-                    (+ count 1))
-                   ((and (equal (current-word) "end")
-                         (not (in-comment)))
-                    (- count 1))
-                   (t count))))
-      ((or (> count 0) (<= (point) min))
-       (if (> count 0)
-          (point)
-        nil))
-    (backward-word 1)))
+  (let ((count 0))
+    (while (not (or (> count 0) (<= (point) min)))
+      (backward-word 1)
+      (setq count
+           (cond ((at-keyword julia-block-start-keywords)
+                  (+ count 1))
+                 ((and (equal (current-word) "end")
+                       (not (in-comment)))
+                  (- count 1))
+                 (t count))))
+    (if (> count 0)
+       (point)
+      nil)))
 
 ; get indent for last open block
 (defun last-open-block (min)



reply via email to

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