Function: cider--goto-end-of-thing-at-point

cider--goto-end-of-thing-at-point is a byte-compiled function defined in cider-util.el.

Signature

(cider--goto-end-of-thing-at-point THING)

Documentation

Move point to the end of the THING at point, sexp or list.

Where there is none - in the whitespace between forms, say - falls back to the sexp preceding point, and only then signals a user-error. The commands that operate on the thing at point are all built this way: step to its end, then hand off to the command that operates on the sexp preceding point, so the two share their handlers and their options.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260920.725/cider-util.el
(defun cider--goto-end-of-thing-at-point (thing)
  "Move point to the end of the THING at point, `sexp' or `list'.
Where there is none - in the whitespace between forms, say - falls back to
the sexp preceding point, and only then signals a `user-error'.  The
commands that operate on the thing at point are all built this way: step
to its end, then hand off to the command that operates on the sexp
preceding point, so the two share their handlers and their options."
  (goto-char (or (cadr (pcase thing
                         ('sexp (cider-sexp-at-point 'bounds))
                         ('list (cider-list-at-point 'bounds))
                         (_ (error "Unknown thing: %S" thing))))
                 ;; Nothing is at point in the whitespace between forms,
                 ;; which is where you land after typing one.  Fall back
                 ;; to the preceding form, so these commands can serve as
                 ;; drop-in replacements for their `last-sexp' siblings.
                 (cdr (cider--last-sexp-bounds))
                 (user-error "No %s at point" thing))))