Mercurial > emacs
comparison lisp/comint.el @ 105195:5b4bbf79ac2a
* comint.el (comint-exec, comint-run, make-comint): Doc
fixes (Bug#4542).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 25 Sep 2009 03:42:22 +0000 |
parents | dc5b8d58abfe |
children | bd2966850aac |
comparison
equal
deleted
inserted
replaced
105194:35632fd1c56a | 105195:5b4bbf79ac2a |
---|---|
684 If BUFFER is nil, it defaults to NAME surrounded by `*'s. | 684 If BUFFER is nil, it defaults to NAME surrounded by `*'s. |
685 PROGRAM should be either a string denoting an executable program to create | 685 PROGRAM should be either a string denoting an executable program to create |
686 via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting | 686 via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting |
687 a TCP connection to be opened via `open-network-stream'. If there is already | 687 a TCP connection to be opened via `open-network-stream'. If there is already |
688 a running process in that buffer, it is not restarted. Optional fourth arg | 688 a running process in that buffer, it is not restarted. Optional fourth arg |
689 STARTFILE is the name of a file to send the contents of to the process. | 689 STARTFILE is the name of a file, whose contents are sent to the |
690 process as its initial input. | |
690 | 691 |
691 If PROGRAM is a string, any more args are arguments to PROGRAM." | 692 If PROGRAM is a string, any more args are arguments to PROGRAM." |
692 (or (fboundp 'start-file-process) | 693 (or (fboundp 'start-file-process) |
693 (error "Multi-processing is not supported for this system")) | 694 (error "Multi-processing is not supported for this system")) |
694 (setq buffer (get-buffer-create (or buffer (concat "*" name "*")))) | 695 (setq buffer (get-buffer-create (or buffer (concat "*" name "*")))) |
707 The name of the buffer is made by surrounding NAME with `*'s. | 708 The name of the buffer is made by surrounding NAME with `*'s. |
708 PROGRAM should be either a string denoting an executable program to create | 709 PROGRAM should be either a string denoting an executable program to create |
709 via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting | 710 via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting |
710 a TCP connection to be opened via `open-network-stream'. If there is already | 711 a TCP connection to be opened via `open-network-stream'. If there is already |
711 a running process in that buffer, it is not restarted. Optional third arg | 712 a running process in that buffer, it is not restarted. Optional third arg |
712 STARTFILE is the name of a file to send the contents of the process to. | 713 STARTFILE is the name of a file, whose contents are sent to the |
714 process as its initial input. | |
713 | 715 |
714 If PROGRAM is a string, any more args are arguments to PROGRAM." | 716 If PROGRAM is a string, any more args are arguments to PROGRAM." |
715 (apply #'make-comint-in-buffer name nil program startfile switches)) | 717 (apply #'make-comint-in-buffer name nil program startfile switches)) |
716 | 718 |
717 ;;;###autoload | 719 ;;;###autoload |
726 (switch-to-buffer (make-comint name program)) | 728 (switch-to-buffer (make-comint name program)) |
727 (run-hooks (intern-soft (concat "comint-" name "-hook"))))) | 729 (run-hooks (intern-soft (concat "comint-" name "-hook"))))) |
728 | 730 |
729 (defun comint-exec (buffer name command startfile switches) | 731 (defun comint-exec (buffer name command startfile switches) |
730 "Start up a process named NAME in buffer BUFFER for Comint modes. | 732 "Start up a process named NAME in buffer BUFFER for Comint modes. |
731 Runs the given COMMAND with SWITCHES with output to STARTFILE. | 733 Runs the given COMMAND with SWITCHES, and initial input from STARTFILE. |
732 Blasts any old process running in the buffer. Doesn't set the buffer mode. | 734 Blasts any old process running in the buffer. Doesn't set the buffer mode. |
733 You can use this to cheaply run a series of processes in the same Comint | 735 You can use this to cheaply run a series of processes in the same Comint |
734 buffer. The hook `comint-exec-hook' is run after each exec." | 736 buffer. The hook `comint-exec-hook' is run after each exec." |
735 (with-current-buffer buffer | 737 (with-current-buffer buffer |
736 (let ((proc (get-buffer-process buffer))) ; Blast any old process. | 738 (let ((proc (get-buffer-process buffer))) ; Blast any old process. |