Function: clojure--find-sexp-to-align

clojure--find-sexp-to-align is a byte-compiled function defined in clojure-mode.el.

Signature

(clojure--find-sexp-to-align END)

Documentation

Non-nil if there's a sexp ahead to be aligned before END.

Place point as in clojure--position-for-alignment.

Source Code

;; Defined in ~/.emacs.d/elpa/clojure-mode-20260325.811/clojure-mode.el
(defun clojure--find-sexp-to-align (end)
  "Non-nil if there's a sexp ahead to be aligned before END.
Place point as in `clojure--position-for-alignment'."
  ;; Look for a relevant sexp.
  (let ((found))
    (while (and (not found)
                (search-forward-regexp
                 (clojure--align-search-regexp)
                 end 'noerror))

      (let ((ppss (syntax-ppss)))
        ;; If we're in a string or comment.
        (unless (or (elt ppss 3)
                    (elt ppss 4))
          ;; Only stop looking if we successfully position
          ;; the point.
          (setq found (clojure--position-for-alignment)))))
    found))