@@ -775,48 +775,47 @@ The property value can be
775775- a list, which is used by `clojure-backtracking-indent' .
776776
777777This function also returns nil meaning don't specify the indentation."
778- (let* ((forward-sexp-function #'clojure-forward-logical-sexp ))
779- ; ; Goto to the open-paren.
780- (goto-char (elt state 1 ))
781- ; ; Maps, sets, vectors and reader conditionals.
782- (if (clojure--not-function-form-p)
783- (1+ (current-column ))
784- ; ; Function or macro call.
785- (forward-char 1 )
786- (let ((method (clojure--find-indent-spec))
787- (containing-form-column (1- (current-column ))))
788- (pcase method
789- ((or (pred integerp) `(, method ))
790- (let ((pos -1 ))
791- (condition-case nil
792- (while (<= (point ) indent-point)
793- (clojure-forward-logical-sexp 1 )
794- (cl-incf pos))
795- ; ; If indent-point is _after_ the last sexp in the
796- ; ; current sexp, we detect that by catching the
797- ; ; `scan-error' . In that case, we should return the
798- ; ; indentation as if there were an extra sexp at point.
799- (scan-error (cl-incf pos)))
800- (cond
801- ((= pos (1+ method))
802- (+ lisp-body-indent containing-form-column))
803- ((> pos (1+ method))
804- (clojure--normal-indent calculate-lisp-indent-last-sexp))
805- (t
806- (+ (* 2 lisp-body-indent) containing-form-column)))))
807- (`:defn
808- (+ lisp-body-indent containing-form-column))
809- ((pred functionp)
810- (funcall method indent-point state))
811- ((and `nil
812- (guard (let ((function (thing-at-point 'sexp )))
813- (or (and clojure-defun-style-default-indent
814- ; ; largely to preserve useful alignment of :require, etc in ns
815- (not (string-match " ^:" function)))
816- (string-match " \\ `\\ (?:\\ S +/\\ )?\\ (def\\ |with-\\ )"
817- function)))))
818- (+ lisp-body-indent containing-form-column))
819- (_ (clojure--normal-indent calculate-lisp-indent-last-sexp)))))))
778+ ; ; Goto to the open-paren.
779+ (goto-char (elt state 1 ))
780+ ; ; Maps, sets, vectors and reader conditionals.
781+ (if (clojure--not-function-form-p)
782+ (1+ (current-column ))
783+ ; ; Function or macro call.
784+ (forward-char 1 )
785+ (let ((method (clojure--find-indent-spec))
786+ (containing-form-column (1- (current-column ))))
787+ (pcase method
788+ ((or (pred integerp) `(, method ))
789+ (let ((pos -1 ))
790+ (condition-case nil
791+ (while (<= (point ) indent-point)
792+ (clojure-forward-logical-sexp 1 )
793+ (cl-incf pos))
794+ ; ; If indent-point is _after_ the last sexp in the
795+ ; ; current sexp, we detect that by catching the
796+ ; ; `scan-error' . In that case, we should return the
797+ ; ; indentation as if there were an extra sexp at point.
798+ (scan-error (cl-incf pos)))
799+ (cond
800+ ((= pos (1+ method))
801+ (+ lisp-body-indent containing-form-column))
802+ ((> pos (1+ method))
803+ (clojure--normal-indent calculate-lisp-indent-last-sexp))
804+ (t
805+ (+ (* 2 lisp-body-indent) containing-form-column)))))
806+ (`:defn
807+ (+ lisp-body-indent containing-form-column))
808+ ((pred functionp)
809+ (funcall method indent-point state))
810+ ((and `nil
811+ (guard (let ((function (thing-at-point 'sexp )))
812+ (or (and clojure-defun-style-default-indent
813+ ; ; largely to preserve useful alignment of :require, etc in ns
814+ (not (string-match " ^:" function)))
815+ (string-match " \\ `\\ (?:\\ S +/\\ )?\\ (def\\ |with-\\ )"
816+ function)))))
817+ (+ lisp-body-indent containing-form-column))
818+ (_ (clojure--normal-indent calculate-lisp-indent-last-sexp))))))
820819
821820; ;; Setting indentation
822821(defun put-clojure-indent (sym indent )
0 commit comments