Fix bug #9963 with abort in "temacs -nw".