Function: eca-chat--clipboard-image-p

eca-chat--clipboard-image-p is a natively compiled function defined in eca-chat-context.el.

Signature

(eca-chat--clipboard-image-p)

Documentation

Return non-nil when an image is available on the clipboard.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-context.el
(defun eca-chat--clipboard-image-p ()
  "Return non-nil when an image is available on the clipboard."
  (when-let* ((targets (and (display-graphic-p)
                            (gui-get-selection 'CLIPBOARD 'TARGETS))))
    (seq-some (lambda (type)
                (and (symbolp type)
                     (string-match-p "^image/" (symbol-name type))))
              (cond ((vectorp targets) (append targets nil))
                     ((symbolp targets) (list targets))
                     (t targets)))))