Function: markdown-ts-table--goto-column

markdown-ts-table--goto-column is a byte-compiled function defined in markdown-ts-mode.el.gz.

Signature

(markdown-ts-table--goto-column COLUMN &optional NO-ERROR)

Documentation

Move point on the current row to COLUMN.

COLUMN is a 0-based index. Return non-nil if successful. If NO-ERROR is non-nil, return nil if the current row does not extend to COLUMN, otherwise signal an error. Signal an error if point is not at a table.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defun markdown-ts-table--goto-column (column &optional no-error)
  "Move point on the current row to COLUMN.
COLUMN is a 0-based index.
Return non-nil if successful.
If NO-ERROR is non-nil, return nil if the current row does not extend to
COLUMN, otherwise signal an error.
Signal an error if point is not at a table."
  (if-let* ((cell (markdown-ts--table-node-cell nil nil t))
            (row (markdown-ts--table-node-row cell))
            (cols (treesit-node-children row 'named)))
      (if-let* ((target-cell (nth column cols)))
          (goto-char (treesit-node-start target-cell))
        (unless no-error
          (error "Column %S not found" column)))
    (error "Not at a table")))