In your code, the vl-cmdf function is returning T when evaluated, which is then being passed to the active command when the your custom command completes its evaluation; whereas in my code, the function is issuing a pause to the active command until the command has completed, at which point it doesn't matter what is returned to the command line, as no command is active.