diff --git a/pivot-table.el b/pivot-table.el index 73898a1..26cd214 100644 --- a/pivot-table.el +++ b/pivot-table.el @@ -52,6 +52,17 @@ TODO: more documentation" (setq n (1+ n)))))) 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: ;; read-symbol-shorthands: (("pt-" . "pivot-table-")) ;; End: