Function: cider-last-sexp

cider-last-sexp is a byte-compiled function defined in cider-util.el.

Signature

(cider-last-sexp &optional BOUNDS)

Documentation

Return the sexp preceding the point.

If BOUNDS is non-nil, return a list of its starting and ending position instead. How the sexp is located is controlled by cider-form-targeting: the default matches the classic behavior exactly, while smart also resolves the form when point sits on its delimiters or inside it.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-util.el
(defun cider-last-sexp (&optional bounds)
  "Return the sexp preceding the point.
If BOUNDS is non-nil, return a list of its starting and ending position
instead.
How the sexp is located is controlled by `cider-form-targeting': the
default matches the classic behavior exactly, while `smart' also
resolves the form when point sits on its delimiters or inside it."
  (let ((b (cider-form-bounds)))
    (if bounds b (apply #'buffer-substring-no-properties b))))