diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-05-11 17:10:30 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-05-11 17:10:30 +0200 |
commit | 43b7759b093cb6b10dd0d4dcb2aff72212b6070d (patch) | |
tree | 92eeb8e9217dad7d65bebde7a5fd57c8144c8a8a /lisp/term.el | |
parent | 9e131744fb17f18da23c18d4f91a140573cb1ad3 (diff) | |
download | emacs-43b7759b093cb6b10dd0d4dcb2aff72212b6070d.tar.gz |
Allow giving switches to the program in `M-x term'
* lisp/term.el (term, ansi-term): Allow giving switches to the
program (bug#18105).
Diffstat (limited to 'lisp/term.el')
-rw-r--r-- | lisp/term.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/term.el b/lisp/term.el index 54e19a3ea92..f81cbf72930 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1581,7 +1581,8 @@ commands to use in that buffer. (or explicit-shell-file-name (getenv "ESHELL") shell-file-name)))) - (set-buffer (make-term "terminal" program)) + (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*")) @@ -4399,7 +4400,10 @@ and `C-x' being marked as a `term-escape-char'." ;; for now they have the *term-ansi-term*<?> form but we'll see... (setq term-ansi-buffer-name (generate-new-buffer-name term-ansi-buffer-name)) - (setq term-ansi-buffer-name (term-ansi-make-term term-ansi-buffer-name program)) + (let ((prog (split-string-shell-command program))) + (setq term-ansi-buffer-name + (apply #'term-ansi-make-term term-ansi-buffer-name (car prog) + nil (cdr prog)))) (set-buffer term-ansi-buffer-name) (term-mode) |