Silence bell, and ring conditionally

Without this the bell will ring for cases like keyboard-quit, which is annoying.