Function: term
term is an autoloaded, interactive and byte-compiled function defined
in term.el.gz.
Signature
(term PROGRAM)
Documentation
Start a terminal-emulator in a new buffer.
The buffer is in Term mode; see term-mode for the
commands to use in that buffer.
Type C-c b (switch-to-buffer) to switch to another buffer.
Probably introduced at or before Emacs version 24.3.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/term.el.gz
;;;###autoload
(defun term (program)
"Start a terminal-emulator in a new buffer.
The buffer is in Term mode; see `term-mode' for the
commands to use in that buffer.
\\<term-raw-map>Type \\[switch-to-buffer] to switch to another buffer."
(interactive (list (read-shell-command "Run program: "
(or explicit-shell-file-name
(getenv "ESHELL")
shell-file-name))))
(let ((prog (split-string-shell-command program)))
(set-buffer (apply #'make-term "terminal" (car prog) nil (cdr prog))))
(term-char-mode)
(pop-to-buffer-same-window "*terminal*"))