Send commands to Emacs from programs running in the term.el terminal emulator