diff options
| author | Roland McGrath | 1993-02-05 18:28:05 +0000 |
|---|---|---|
| committer | Roland McGrath | 1993-02-05 18:28:05 +0000 |
| commit | 14a08856ecfea7097adb718582cb1fdd5b4565cd (patch) | |
| tree | e65845f6f7e9316bd28632e6a4c6a1b67a175999 /lisp | |
| parent | d81362b0c381dbea6d49c75e9e085e1a8502f206 (diff) | |
| download | emacs-14a08856ecfea7097adb718582cb1fdd5b4565cd.tar.gz emacs-14a08856ecfea7097adb718582cb1fdd5b4565cd.zip | |
(make-comint): Added docstring.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/comint.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 0c2022e53bf..00b96185c22 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; comint.el --- general command interpreter in a window stuff | 1 | ;;; comint.el --- general command interpreter in a window stuff |
| 2 | ;; Copyright (C) 1988, 1990, 1992 Free Software Foundation, Inc. | 2 | ;; Copyright (C) 1988, 1990, 1992, 1993 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> | 4 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> |
| 5 | ;; Keyword: processes | 5 | ;; Keyword: processes |
| @@ -301,9 +301,14 @@ name of one" | |||
| 301 | ;;; for the second argument (program). | 301 | ;;; for the second argument (program). |
| 302 | ;;;###autoload | 302 | ;;;###autoload |
| 303 | (defun make-comint (name program &optional startfile &rest switches) | 303 | (defun make-comint (name program &optional startfile &rest switches) |
| 304 | "Make a comint process NAME in a buffer, running PROGRAM. | ||
| 305 | The name of the buffer is made by surrounding NAME with `*'s. | ||
| 306 | If there is already a running process in that buffer, it is not restarted. | ||
| 307 | Optional third arg STARTFILE is the name of a file to send the contents of to | ||
| 308 | the process. Any more args are arguments to PROGRAM." | ||
| 304 | (let ((buffer (get-buffer-create (concat "*" name "*")))) | 309 | (let ((buffer (get-buffer-create (concat "*" name "*")))) |
| 305 | ;; If no process, or nuked process, crank up a new one and put buffer in | 310 | ;; If no process, or nuked process, crank up a new one and put buffer in |
| 306 | ;; comint mode. Otherwise, leave buffer and existing process alone. | 311 | ;; comint mode. Otherwise, leave buffer and existing process alone. |
| 307 | (cond ((not (comint-check-proc buffer)) | 312 | (cond ((not (comint-check-proc buffer)) |
| 308 | (save-excursion | 313 | (save-excursion |
| 309 | (set-buffer buffer) | 314 | (set-buffer buffer) |
| @@ -313,9 +318,9 @@ name of one" | |||
| 313 | 318 | ||
| 314 | (defun comint-exec (buffer name command startfile switches) | 319 | (defun comint-exec (buffer name command startfile switches) |
| 315 | "Fires up a process in buffer for comint modes. | 320 | "Fires up a process in buffer for comint modes. |
| 316 | Blasts any old process running in the buffer. Doesn't set the buffer mode. | 321 | Blasts any old process running in the buffer. Doesn't set the buffer mode. |
| 317 | You can use this to cheaply run a series of processes in the same comint | 322 | You can use this to cheaply run a series of processes in the same comint |
| 318 | buffer. The hook comint-exec-hook is run after each exec." | 323 | buffer. The hook comint-exec-hook is run after each exec." |
| 319 | (save-excursion | 324 | (save-excursion |
| 320 | (set-buffer buffer) | 325 | (set-buffer buffer) |
| 321 | (let ((proc (get-buffer-process buffer))) ; Blast any old process. | 326 | (let ((proc (get-buffer-process buffer))) ; Blast any old process. |