Function: eca-chat-inline--remap-invisible

eca-chat-inline--remap-invisible is a natively compiled function defined in eca-chat-inline.el.

Signature

(eca-chat-inline--remap-invisible TEXT)

Documentation

Return TEXT with markdown-markup invisibility made portable.

markdown-mode marks markup with the invisible value markdown-markup, which only hides in buffers whose invisibility spec lists it. Rewrite it to t (hides anywhere) when eca-chat-hide-markdown-markup is non-nil, else drop it so the markup stays visible everywhere.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-inline.el
(defun eca-chat-inline--remap-invisible (text)
  "Return TEXT with `markdown-markup' invisibility made portable.
`markdown-mode' marks markup with the `invisible' value
`markdown-markup', which only hides in buffers whose invisibility
spec lists it.  Rewrite it to t (hides anywhere) when
`eca-chat-hide-markdown-markup' is non-nil, else drop it so the
markup stays visible everywhere."
  (let ((pos 0)
        (len (length text)))
    (while (< pos len)
      (let ((next (or (next-single-property-change pos 'invisible text)
                      len)))
        (when (eq (get-text-property pos 'invisible text) 'markdown-markup)
          (if eca-chat-hide-markdown-markup
              (put-text-property pos next 'invisible t text)
            (remove-text-properties pos next '(invisible nil) text)))
        (setq pos next)))
    text))