branch: elpa/julia-mode commit 27ecdc5409c8cc8939541d7704c92d65e33a94a6 Author: Jeff Bezanson <bezan...@post.harvard.edu> Commit: Yichao Yu <yyc1...@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)