While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
Closes GH-5295.