Function: cider-form-bounds

cider-form-bounds is a byte-compiled function defined in cider-util.el.

Signature

(cider-form-bounds &optional MIN)

Documentation

Return the list (START END) of the form point targets.

Honors cider-form-targeting; with the default preceding targeting this is exactly the bounds of the sexp preceding point. MIN expresses a constraint of the operation itself, not a user preference: the symbol compound means the target should be no narrower than a compound form, since some operations (macroexpansion, notably) can only consume a call form, never a bare symbol. It is only consulted by smart targeting; preceding targeting always returns the classic preceding sexp, atoms included.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-util.el
(defun cider-form-bounds (&optional min)
  "Return the list (START END) of the form point targets.
Honors `cider-form-targeting'; with the default `preceding' targeting
this is exactly the bounds of the sexp preceding point.
MIN expresses a constraint of the operation itself, not a user
preference: the symbol `compound' means the target should be no
narrower than a compound form, since some operations (macroexpansion,
notably) can only consume a call form, never a bare symbol.  It is
only consulted by `smart' targeting; `preceding' targeting always
returns the classic preceding sexp, atoms included."
  (let ((b (if (eq cider-form-targeting 'smart)
               (cider--smart-form-bounds min)
             (cider--preceding-form-bounds))))
    (list (car b) (cdr b))))