Does the %(prompt) sequence provide a way to preserve the last entered prompt? The prompt escape is very useful for custom scripts with many targets but when there are errors one ends up calling it several times with the same argument (ie, build "x", fix errors, repeat a few times, move on to build "y", etc). Saving the last prompt would work out very well in this case.
Thanks again,
Iker