This file is copyright (c) 2004,2005,2006 by Panu Kalliokoski
and released under the license in ../LICENSE

Quoting underscores and dollar signs...

First, quote-quote underscores that should _not_ be quoted.
{{{
s#__line#UNDERSCORETHINGYUNDERSCORETHINGYline#g
s#__file#UNDERSCORETHINGYUNDERSCORETHINGYfile#g
s#w_#wUNDERSCORETHINGY#g
t moreus
: moreus
s#\(UNDERSCORETHINGY[a-z]*\)_#\1UNDERSCORETHINGY#g
t moreus
}}}

Then, do the actual quoting and quote-quote unquoting.
{{{
s#_#`'w_us`'#g
s#UNDERSCORETHINGY#_#g
}}}

Dollar signs are also problematic.
{{{
/define/!{
/`/!{
s#\$#`'w_dol`'#g
}
}
}}}
