From af0aa20e62c6e8abe5188530a530a57692bb4e8f Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sun, 29 Jun 2003 11:04:04 +0000 Subject: Explain in more details how define interacts with pushdef/popdef, and how that varies from an m4 implementation to another. ok jmc@ --- usr.bin/m4/m4.1 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/usr.bin/m4/m4.1 b/usr.bin/m4/m4.1 index e417d32f39a..6481822022f 100644 --- a/usr.bin/m4/m4.1 +++ b/usr.bin/m4/m4.1 @@ -1,4 +1,4 @@ -.\" @(#) $OpenBSD: m4.1,v 1.33 2003/06/27 21:22:52 jmc Exp $ +.\" @(#) $OpenBSD: m4.1,v 1.34 2003/06/29 11:04:03 espie Exp $ .\" .\" Copyright (c) 1989, 1993 .\" The Regents of the University of California. All rights reserved. @@ -395,6 +395,19 @@ to allow .Nm autoconf to work. .Pp +The built-ins +.Ic pushdef +and +.Ic popdef +handle macro definitions as a stack. +However, +.Ic define +interacts with the stack in an undefined way. +In this implementation, +.Ic define +replaces the top-most definition only. +Other implementations may erase all definitions on the stack instead. +.Pp For portability, one should not use the macros .Ic builtin , .Ic esycmd , -- cgit v1.2.3