File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -678,7 +678,9 @@ Implementation function for `clojure--find-indent-spec'."
678
678
(let ((clojure--current-backtracking-depth (1+ clojure--current-backtracking-depth))
679
679
(pos 0 ))
680
680
; ; Count how far we are from the start of the sexp.
681
- (while (ignore-errors (clojure-backward-logical-sexp 1 ) t )
681
+ (while (ignore-errors (clojure-backward-logical-sexp 1 )
682
+ (not (or (bobp )
683
+ (eq (char-before ) ?\n ))))
682
684
(cl-incf pos))
683
685
(let* ((function (thing-at-point 'symbol ))
684
686
(method (or (when function ; ; Is there a spec here?
@@ -722,18 +724,20 @@ spec."
722
724
" Return the normal indentation column for a sexp.
723
725
LAST-SEXP is the start of the previous sexp."
724
726
(goto-char last-sexp)
727
+ (forward-sexp 1 )
728
+ (clojure-backward-logical-sexp 1 )
725
729
(let ((last-sexp-start nil ))
726
730
(unless (ignore-errors
727
- (while (progn (skip-chars-backward " #?'`~@[:blank:]" )
728
- (not (looking-at " ^" )))
731
+ (while (string-match
732
+ " [^[:blank:]]"
733
+ (buffer-substring (line-beginning-position ) (point )))
729
734
(setq last-sexp-start (prog1 (point )
730
735
(forward-sexp -1 ))))
731
736
t )
732
737
; ; If the last sexp was on the same line.
733
738
(when (and last-sexp-start
734
739
(> (line-end-position ) last-sexp-start))
735
740
(goto-char last-sexp-start)))
736
- (skip-chars-forward " [:blank:]" )
737
741
(current-column )))
738
742
739
743
(defun clojure--not-function-form-p ()
Original file line number Diff line number Diff line change @@ -279,6 +279,15 @@ values of customisable variables."
279
279
ok
280
280
)" )
281
281
282
+ (def-full-indent-test symbols-ending-in-crap
283
+ " (msg? ExceptionInfo
284
+ 10)"
285
+ " (thrown-with-msg? ExceptionInfo
286
+ #\" Storage must be initialized before use\"
287
+ (f))"
288
+ " (msg' 1
289
+ 10)" )
290
+
282
291
283
292
; ;; Misc
284
293
You can’t perform that action at this time.
0 commit comments