Function: cider-ns-edit--option-indices

cider-ns-edit--option-indices is a byte-compiled function defined in cider-ns.el.

Signature

(cider-ns-edit--option-indices POS KEYWORDS)

Documentation

Return the indices of the KEYWORDS options of the libspec at POS.

That's the indices of each keyword and of its value.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20261106.1225/cider-ns.el
(defun cider-ns-edit--option-indices (pos keywords)
  "Return the indices of the KEYWORDS options of the libspec at POS.
That's the indices of each keyword and of its value."
  (let ((elements (mapcar #'cider-ns-edit--text (cider-ns-edit--elements pos)))
        indices)
    (dotimes (i (/ (1- (length elements)) 2))
      (let ((key (1+ (* 2 i))))
        (when (member (nth key elements) keywords)
          (push key indices)
          (push (1+ key) indices))))
    indices))