groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Hygienic mode design


From: Werner LEMBERG
Subject: Re: [Groff] Hygienic mode design
Date: Wed, 05 Mar 2014 07:27:13 +0100 (CET)

> Actually, now that I think about it, the right semantics for
> ".hygiene" is probably "hide everything *currently defined* that
> hasn't been declared visible".  That way you can define macros after
> a .hygiene call and they'll be visible unless you do another
> .hygiene call.

What about doing the autoconf approach with regular patterns to allow
and disallow function names?  Example from `pkg.m4':

  m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])

In autoconf, the patterns get collected in a log file during a call to
the m4 preprocessor, and later on the perl script `autom4te' scans all
user-defined macros against those patterns, aborting if there is a
match with a forbidden pattern.


      Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]