gbranden pushed a commit to branch master
in repository groff.
commit a0250c2ef40498e84cc7d4cfab0600087c9cfd15
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat May 30 01:26:30 2026 -0500
tmac/an.tmac: Add warning to new `LE` macro.
* tmac/an.tmac (LE): Throw warning when macro called with no lists open.
---
ChangeLog | 5 +++++
tmac/an.tmac | 2 ++
2 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 2213604c4..072e86b78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2026-05-30 G. Branden Robinson <[email protected]>
+
+ * tmac/an.tmac (LE): Throw warning when macro called with no
+ lists open.
+
2026-05-30 G. Branden Robinson <[email protected]>
* tmac/an.tmac: Trivially refactor.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index f16643025..2d302fa5e 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1523,6 +1523,8 @@ contains unsupported escape sequence
.
.\" End (or "close") the most recently unclosed list.
.de1 LE
+. if !\\n[an*list-depth] \
+. an*warn ignoring .\\$0 call when no list open
. if \\n[DEBUG] .tm GBR: mark VALID14: \\$0
. rm an*list-indent!\\n[an*list-depth]
. rr an*list-is-compact!\\n[an*list-depth]
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit