Switch to normal zsh %F/%f prompt escapes to avoid "eval" and extra variables.
Wrap whole thing in anonymous function so the existing `local`
statements actually work. Then switch '...' to eager "..." so
stuff actually works with local variables. And local-ize the
remaining variables that are used only in prompt construction.