Recommended m4 macro naming convention?

Daniel Goldman <[email protected]> Thu, 01 May 2014 23:33:17 -0700
Newsgroups gmane.comp.gnu.m4.general
Message-ID <[email protected]>
This may seem a silly question to some, but I think naming conventions 
are important. So, any advice concerning naming conventions for m4 macro 
names, eg foo_bar, fooBar, Foo_Bar, FOO_BAR, etc?

[A-Z_a-z][A-Z_a-z0-9]* is the requirement for m4 macro names, I hope I 
got that right, :) so that is not my question.

In cpp, the strong standard is UPPER_CASE, such as:

#define ANALYZES_AGES_UNDER_ONE__________TF FALSE

Of course cpp doesn't care, allows same names as m4. But it is 
reassuring to always see UPPER_CASE, a dead giveaway for cpp macros.

In the GNU m4 manual, all the builtin macros are lowercase, and the 
examples almost all use lowercase macro names. But an example from the 
Gnulib project uses uppercase. sendmail seems to use at least a few 
uppercase macros, maybe a lot. Some postings on this group use uppercase 
names. My cpp experience makes me want to use UPPER_CASE. Is there any 
general guideline, or is it just "whatever you like"? If no general 
guideline, should there be?

Could one argue builtins behave like "functions" (I know they are 
macros), so maybe use lower_case for user-defined macros with "function" 
behavior (just like some C lowercase macros, eg, isascii), and use 
UPPER_CASE for "pure" macros (simple substitution)?

Thanks,
Daniel