Function: embark-custom-candidates

embark-custom-candidates is a byte-compiled function defined in embark.el.

Signature

(embark-custom-candidates)

Documentation

Return all variables and faces listed in this Custom-mode buffer.

Source Code

;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
(defun embark-custom-candidates ()
  "Return all variables and faces listed in this `Custom-mode' buffer."
  (when (derived-mode-p 'Custom-mode)
    (cons 'symbol ; gets refined to variable or face when acted upon
          (save-excursion
            (goto-char (point-min))
            (let (symbols)
              (while (not (eobp))
                (when-let* ((widget (widget-at (point))))
                  (when (eq (car widget) 'custom-visibility)
                    (push
                     `(,(symbol-name
                         (plist-get (cdr (plist-get (cdr widget) :parent))
                                    :value))
                       ,(point)
                       . ,(progn
                            (re-search-forward ":" (line-end-position) 'noerror)
                            (point)))
                     symbols)))
                (forward-line))
              (nreverse symbols))))))