File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -788,7 +788,8 @@ This function also returns nil meaning don't specify the indentation."
788788 ((or (pred integerp) `(, method ))
789789 (let ((pos -1 ))
790790 (condition-case nil
791- (while (<= (point ) indent-point)
791+ (while (and (<= (point ) indent-point)
792+ (not (eobp )))
792793 (clojure-forward-logical-sexp 1 )
793794 (cl-incf pos))
794795 ; ; If indent-point is _after_ the last sexp in the
Original file line number Diff line number Diff line change 2828(require 'ert )
2929(require 's )
3030
31+ (ert-deftest dont-hang-on-eob ()
32+ (with-temp-buffer
33+ (insert " (let [a b]" )
34+ (clojure-mode)
35+ (goto-char (point-max ))
36+ (should
37+ (with-timeout (2 )
38+ (newline-and-indent )
39+ t ))))
40+
3141(defmacro check-indentation (description before after &optional var-bindings )
3242 " Declare an ert test for indentation behaviour.
3343The test will check that the swift indentation command changes the buffer
You can’t perform that action at this time.
0 commit comments