From df2a9a70b3d13b63cdecb454a936ef9b689e6aea Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Mon, 12 May 2025 18:01:59 -0400 Subject: [PATCH] defined `pt-get-body` --- pivot-table.el | 11 +++++++++++ 1 file changed, 11 insertions(+) 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: