Function: table--goto-coordinate
table--goto-coordinate is a byte-compiled function defined in
table.el.gz.
Signature
(table--goto-coordinate COORDINATE &optional NO-EXTENSION NO-TAB-EXPANSION)
Documentation
Move point to the given COORDINATE and return the location.
When optional NO-EXTENSION is non-nil and the specified coordinate is not reachable returns nil otherwise the blanks are added if necessary to achieve the goal coordinate and returns the goal point. It intentionally does not preserve the original point in case it fails achieving the goal. When optional NO-TAB-EXPANSION is non-nil and the goad happens to be in a tab character the tab is not expanded but the goal ends at the beginning of tab.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/table.el.gz
(defun table--goto-coordinate (coordinate &optional no-extension no-tab-expansion)
"Move point to the given COORDINATE and return the location.
When optional NO-EXTENSION is non-nil and the specified coordinate is
not reachable returns nil otherwise the blanks are added if necessary
to achieve the goal coordinate and returns the goal point. It
intentionally does not preserve the original point in case it fails
achieving the goal. When optional NO-TAB-EXPANSION is non-nil and the
goad happens to be in a tab character the tab is not expanded but the
goal ends at the beginning of tab."
(if (or (null coordinate)
(< (car coordinate) 0)
(< (cdr coordinate) 0)) nil
(goto-char (point-min))
(let ((x (car coordinate))
(more-lines (forward-line (cdr coordinate))))
(catch 'exit
(if (zerop (current-column)) nil
(if no-extension
(progn
(move-to-column x)
(throw 'exit nil))
(setq more-lines (1+ more-lines))))
(if (zerop more-lines) nil
(newline more-lines))
(if no-extension
(if (/= (move-to-column x) x)
(if (> (move-to-column x) x)
(if no-tab-expansion
(progn
(while (> (move-to-column x) x)
(setq x (1- x)))
(point))
(throw 'exit (move-to-column x t)))
(throw 'exit nil)))
(move-to-column x t))
(point)))))