defined pt-get-body

This commit is contained in:
2025-05-12 18:01:59 -04:00
parent 7e2b9f3dde
commit df2a9a70b3

View File

@@ -52,6 +52,17 @@ TODO: more documentation"
(setq n (1+ n)))))) (setq n (1+ n))))))
result)) result))
(defun pt-get-body (source)
"Discards all rows from a table before the first hline (if present)
If there is no hline, the table is instead returned unaltered."
(catch :return
(let ((remain source))
(while remain
(when (eq (car remain) 'hline)
(throw :return (cdr remain)))
(pop remain))
source)))
;; Local Variables: ;; Local Variables:
;; read-symbol-shorthands: (("pt-" . "pivot-table-")) ;; read-symbol-shorthands: (("pt-" . "pivot-table-"))
;; End: ;; End: