Function: cider-macrostep--move-to-expandable

cider-macrostep--move-to-expandable is a byte-compiled function defined in cider-macrostep.el.

Signature

(cider-macrostep--move-to-expandable DIRECTION)

Documentation

Move point to the next expandable operator in DIRECTION (1 or -1), wrapping.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-macrostep.el
(defun cider-macrostep--move-to-expandable (direction)
  "Move point to the next expandable operator in DIRECTION (1 or -1), wrapping."
  (let ((positions (sort (mapcar #'overlay-start
                                 cider-macrostep--expandable-overlays)
                         #'<)))
    (unless positions
      (user-error "No further-expandable forms"))
    (goto-char
     (if (> direction 0)
         (or (seq-find (lambda (p) (> p (point))) positions)
             (car positions))
       (or (seq-find (lambda (p) (< p (point))) (reverse positions))
           (car (last positions)))))))