Wrap callback in inhibit-quit.