diff options
| author | Stefan Monnier | 2003-05-13 18:30:46 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-05-13 18:30:46 +0000 |
| commit | 1cccb0b6d4e9cd70fccca16ef9c99c1f67b0a805 (patch) | |
| tree | 924f690a6fb4d7182b41289443698d18641af8d6 | |
| parent | 94d79fb4061556879d8d9e777e107a58f57b99c1 (diff) | |
| download | emacs-1cccb0b6d4e9cd70fccca16ef9c99c1f67b0a805.tar.gz emacs-1cccb0b6d4e9cd70fccca16ef9c99c1f67b0a805.zip | |
(comint-carriage-motion, comint-output-filter):
Bind inhibit-read-only rather than buffer-read-only.
(comint-truncate-buffer): Bind inhibit-read-only.
| -rw-r--r-- | lisp/comint.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 126f05b1a79..f7ea8194936 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; comint.el --- general command interpreter in a window stuff | 1 | ;;; comint.el --- general command interpreter in a window stuff |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 90, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 | 3 | ;; Copyright (C) 1988,90,92,93,94,95,96,97,98,99,2000,01,02,2003 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> | 6 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> |
| @@ -682,8 +682,7 @@ See `make-comint' and `comint-exec'." | |||
| 682 | Blasts any old process running in the buffer. Doesn't set the buffer mode. | 682 | Blasts any old process running in the buffer. Doesn't set the buffer mode. |
| 683 | You can use this to cheaply run a series of processes in the same comint | 683 | You can use this to cheaply run a series of processes in the same comint |
| 684 | buffer. The hook `comint-exec-hook' is run after each exec." | 684 | buffer. The hook `comint-exec-hook' is run after each exec." |
| 685 | (save-excursion | 685 | (with-current-buffer buffer |
| 686 | (set-buffer buffer) | ||
| 687 | (let ((proc (get-buffer-process buffer))) ; Blast any old process. | 686 | (let ((proc (get-buffer-process buffer))) ; Blast any old process. |
| 688 | (if proc (delete-process proc))) | 687 | (if proc (delete-process proc))) |
| 689 | ;; Crank up a new process | 688 | ;; Crank up a new process |
| @@ -1562,7 +1561,7 @@ Make backspaces delete the previous character." | |||
| 1562 | (save-restriction | 1561 | (save-restriction |
| 1563 | (widen) | 1562 | (widen) |
| 1564 | (let ((inhibit-field-text-motion t) | 1563 | (let ((inhibit-field-text-motion t) |
| 1565 | (buffer-read-only nil)) | 1564 | (inhibit-read-only t)) |
| 1566 | ;; CR LF -> LF | 1565 | ;; CR LF -> LF |
| 1567 | ;; Note that this won't work properly when the CR and LF | 1566 | ;; Note that this won't work properly when the CR and LF |
| 1568 | ;; are in different output chunks, but this is probably an | 1567 | ;; are in different output chunks, but this is probably an |
| @@ -1601,7 +1600,7 @@ Make backspaces delete the previous character." | |||
| 1601 | (setq functions (cdr functions)))) | 1600 | (setq functions (cdr functions)))) |
| 1602 | 1601 | ||
| 1603 | ;; Insert STRING | 1602 | ;; Insert STRING |
| 1604 | (let ((buffer-read-only nil) | 1603 | (let ((inhibit-read-only t) |
| 1605 | ;; Avoid the overhead of save-excursion, since we just | 1604 | ;; Avoid the overhead of save-excursion, since we just |
| 1606 | ;; fiddle with the point | 1605 | ;; fiddle with the point |
| 1607 | (saved-point (point-marker))) | 1606 | (saved-point (point-marker))) |
| @@ -1772,7 +1771,8 @@ This function could be on `comint-output-filter-functions' or bound to a key." | |||
| 1772 | (goto-char (process-mark (get-buffer-process (current-buffer)))) | 1771 | (goto-char (process-mark (get-buffer-process (current-buffer)))) |
| 1773 | (forward-line (- comint-buffer-maximum-size)) | 1772 | (forward-line (- comint-buffer-maximum-size)) |
| 1774 | (beginning-of-line) | 1773 | (beginning-of-line) |
| 1775 | (delete-region (point-min) (point)))) | 1774 | (let ((inhibit-read-only t)) |
| 1775 | (delete-region (point-min) (point))))) | ||
| 1776 | 1776 | ||
| 1777 | (defun comint-strip-ctrl-m (&optional string) | 1777 | (defun comint-strip-ctrl-m (&optional string) |
| 1778 | "Strip trailing `^M' characters from the current output group. | 1778 | "Strip trailing `^M' characters from the current output group. |