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'."
678678 (let ((clojure--current-backtracking-depth (1+ clojure--current-backtracking-depth))
679679 (pos 0 ))
680680 ; ; 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 ))))
682684 (cl-incf pos))
683685 (let* ((function (thing-at-point 'symbol ))
684686 (method (or (when function ; ; Is there a spec here?
@@ -722,18 +724,20 @@ spec."
722724 " Return the normal indentation column for a sexp.
723725LAST-SEXP is the start of the previous sexp."
724726 (goto-char last-sexp)
727+ (forward-sexp 1 )
728+ (clojure-backward-logical-sexp 1 )
725729 (let ((last-sexp-start nil ))
726730 (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 )))
729734 (setq last-sexp-start (prog1 (point )
730735 (forward-sexp -1 ))))
731736 t )
732737 ; ; If the last sexp was on the same line.
733738 (when (and last-sexp-start
734739 (> (line-end-position ) last-sexp-start))
735740 (goto-char last-sexp-start)))
736- (skip-chars-forward " [:blank:]" )
737741 (current-column )))
738742
739743(defun clojure--not-function-form-p ()
Original file line number Diff line number Diff line change @@ -279,6 +279,15 @@ values of customisable variables."
279279 ok
280280 )" )
281281
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+
282291
283292; ;; Misc
284293
You can’t perform that action at this time.
0 commit comments