[sr #105855] Multi-op patsubst() and translit()

Eric Blake <[email protected]> Fri, 4 Apr 2025 10:21:15 -0400 (EDT)
Newsgroups gmane.comp.gnu.m4.bugs
Message-ID <[email protected]>
Follow-up Comment #4, sr #105855 (group m4):

I'm seriously thinking of adding a qindir builtin to m4 1.6, which executes
any other builtin macro but adds a layer of quoting around its expansion.
Example:

define(`b', `B')dnl
substr(`abc', 1, 1)
=> B
indir(`substr', `abc', 1, 1)
=> B
qindir(`substr', `abc', 1, 1)
=> b

with qindir, you CAN write a recursive patsubst that properly quotes the input
for the next round of replacement.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?105855>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZ+/q2wAKCRCqLAuaBUf3
TnJMAQCXY/H5LzJ2B36PMkybPYUGDpIbygOO6YiMc0zRAXWBiwEAqnMDSqUC6k/7
rtGfL4nbY4MnTfctJPaAL4bkxIWzowM=
=+LSq
-----END PGP SIGNATURE-----