Ganked this from deepin-emacs (they fixed the multi-term.el file I have here)