Function: eca-chat--show-image-thumbnail

eca-chat--show-image-thumbnail is a natively compiled function defined in eca-chat-image.el.

Signature

(eca-chat--show-image-thumbnail START END IMAGE)

Documentation

Display IMAGE in place of the image mention from START to END.

Only the display changes: the overlay goes away with the mention text, and RET or a middle click on the thumbnail hides it again. Text inserted at either end stays out of the overlay. Return it.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-image.el
(defun eca-chat--show-image-thumbnail (start end image)
  "Display IMAGE in place of the image mention from START to END.
Only the display changes: the overlay goes away with the mention
text, and RET or a middle click on the thumbnail hides it again.
Text inserted at either end stays out of the overlay.  Return it."
  (let* ((ov (make-overlay start end nil t nil))
         (hide (lambda () (interactive) (delete-overlay ov))))
    (overlay-put ov 'eca-chat-image-thumbnail t)
    (overlay-put ov 'display image)
    (overlay-put ov 'keymap (eca-chat--image-keymap hide))
    (overlay-put ov 'mouse-face 'highlight)
    (overlay-put ov 'help-echo "RET or mouse-2: hide the thumbnail")
    (overlay-put ov 'evaporate t)
    ov))