Function: eca-table--max-line-width

eca-table--max-line-width is a natively compiled function defined in eca-table.el.

Signature

(eca-table--max-line-width BEG END)

Documentation

Return the maximum display line width between BEG and END.

Subtracts hidden markup characters so the result reflects the visual width when markdown-hide-markup is active.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-table.el
(defun eca-table--max-line-width (beg end)
  "Return the maximum display line width between BEG and END.
Subtracts hidden markup characters so the result reflects
the visual width when `markdown-hide-markup' is active."
  (let ((max-width 0))
    (save-excursion
      (goto-char beg)
      (while (< (point) end)
        (let* ((raw (- (line-end-position)
                       (line-beginning-position)))
               (hidden (eca-table--count-markup-chars
                        (buffer-substring-no-properties
                         (line-beginning-position)
                         (line-end-position)))))
          (setq max-width
                (max max-width (- raw hidden))))
        (forward-line 1)))
    max-width))