Function: eca-table--insert-cell

eca-table--insert-cell is a natively compiled function defined in eca-table.el.

Signature

(eca-table--insert-cell CELL PADDING ALIGNMENT)

Documentation

Insert CELL content with PADDING extra spaces using ALIGNMENT.

ALIGNMENT is "l", "r", "c", or nil (left-aligned).

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-table.el
(defun eca-table--insert-cell (cell padding alignment)
  "Insert CELL content with PADDING extra spaces using ALIGNMENT.
ALIGNMENT is \"l\", \"r\", \"c\", or nil (left-aligned)."
  (pcase alignment
    ("r"
     (insert (make-string (+ 1 padding) ?\s) cell " |"))
    ("c"
     (let* ((left (/ padding 2))
            (right (- padding left)))
       (insert (make-string (+ 1 left) ?\s) cell
               (make-string (+ 1 right) ?\s) "|")))
    (_
     (insert " " cell (make-string (+ 1 padding) ?\s) "|"))))