emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/comint.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/comint.el [lexbind]
Date: Tue, 14 Oct 2003 19:51:41 -0400

Index: emacs/lisp/comint.el
diff -c emacs/lisp/comint.el:1.272.2.1 emacs/lisp/comint.el:1.272.2.2
*** emacs/lisp/comint.el:1.272.2.1      Fri Apr  4 01:20:00 2003
--- emacs/lisp/comint.el        Tue Oct 14 19:50:50 2003
***************
*** 1,6 ****
  ;;; comint.el --- general command interpreter in a window stuff
  
! ;; Copyright (C) 1988, 90, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002
  ;;    Free Software Foundation, Inc.
  
  ;; Author: Olin Shivers <address@hidden>
--- 1,6 ----
  ;;; comint.el --- general command interpreter in a window stuff
  
! ;; Copyright (C) 1988,90,92,93,94,95,96,97,98,99,2000,01,02,2003
  ;;    Free Software Foundation, Inc.
  
  ;; Author: Olin Shivers <address@hidden>
***************
*** 244,259 ****
                 (const this))
    :group 'comint)
  
! (defcustom comint-scroll-to-bottom-on-output nil
!   "*Controls whether interpreter output causes window to scroll.
! If nil, then do not scroll.  If t or `all', scroll all windows showing buffer.
! If `this', scroll only the selected window.
! If `others', scroll only those that are not the selected window.
  
  The default is nil.
  
! See variable `comint-scroll-show-maximum-output' and function
! `comint-postoutput-scroll-to-bottom'.  This variable is buffer-local."
    :type '(choice (const :tag "off" nil)
                 (const t)
                 (const all)
--- 244,262 ----
                 (const this))
    :group 'comint)
  
! (defcustom comint-move-point-for-output nil
!   "*Controls whether interpreter output moves point to the end of the output.
! If nil, then output never moves point to the output.
!  (If the output occurs at point, it is inserted before point.)
! If t or `all', move point in all windows showing the buffer.
! If `this', move point only the selected window.
! If `others', move point only in other windows, not in the selected window.
  
  The default is nil.
  
! See the variable `comint-scroll-show-maximum-output' and the function
! `comint-postoutput-scroll-to-bottom'.
! This variable is buffer-local in all comint buffers."
    :type '(choice (const :tag "off" nil)
                 (const t)
                 (const all)
***************
*** 261,272 ****
                 (const others))
    :group 'comint)
  
! (defcustom comint-scroll-show-maximum-output t
!   "*Controls how interpreter output causes window to scroll.
! If non-nil, then show the maximum output when the window is scrolled.
  
! See variable `comint-scroll-to-bottom-on-output' and function
! `comint-postoutput-scroll-to-bottom'.  This variable is buffer-local."
    :type 'boolean
    :group 'comint)
  
--- 264,285 ----
                 (const others))
    :group 'comint)
  
! (defvaralias 'comint-scroll-to-bottom-on-output 'comint-move-point-for-output)
  
! (defcustom comint-scroll-show-maximum-output t
!   "*Controls how to scroll due to interpreter output.
! This variable applies when point is at the end of the buffer
! \(either because it was originally there, or because
! `comint-move-point-for-output' said to move it there)
! and output from the subprocess is inserted.
! 
! Non-nil means scroll so that the window is full of text
! and point is on the last line.  A value of nil
! means don't do anyting special--scroll normally.
! 
! See also the variable `comint-move-point-for-output' and the function
! `comint-postoutput-scroll-to-bottom'.
! This variable is buffer-local in all comint buffers."
    :type 'boolean
    :group 'comint)
  
***************
*** 430,436 ****
  (put 'comint-output-filter-functions 'permanent-local t)
  (put 'comint-preoutput-filter-functions 'permanent-local t)
  (put 'comint-scroll-to-bottom-on-input 'permanent-local t)
! (put 'comint-scroll-to-bottom-on-output 'permanent-local t)
  (put 'comint-scroll-show-maximum-output 'permanent-local t)
  (put 'comint-ptyp 'permanent-local t)
  
--- 443,449 ----
  (put 'comint-output-filter-functions 'permanent-local t)
  (put 'comint-preoutput-filter-functions 'permanent-local t)
  (put 'comint-scroll-to-bottom-on-input 'permanent-local t)
! (put 'comint-move-point-for-output 'permanent-local t)
  (put 'comint-scroll-show-maximum-output 'permanent-local t)
  (put 'comint-ptyp 'permanent-local t)
  
***************
*** 464,470 ****
  Input to, and output from, the subprocess can cause the window to scroll to
  the end of the buffer.  See variables `comint-output-filter-functions',
  `comint-preoutput-filter-functions', `comint-scroll-to-bottom-on-input',
! and `comint-scroll-to-bottom-on-output'.
  
  If you accidentally suspend your process, use \\[comint-continue-subjob]
  to continue it.
--- 477,483 ----
  Input to, and output from, the subprocess can cause the window to scroll to
  the end of the buffer.  See variables `comint-output-filter-functions',
  `comint-preoutput-filter-functions', `comint-scroll-to-bottom-on-input',
! and `comint-move-point-for-output'.
  
  If you accidentally suspend your process, use \\[comint-continue-subjob]
  to continue it.
***************
*** 499,505 ****
    (make-local-variable 'comint-input-sender)
    (make-local-variable 'comint-eol-on-send)
    (make-local-variable 'comint-scroll-to-bottom-on-input)
!   (make-local-variable 'comint-scroll-to-bottom-on-output)
    (make-local-variable 'comint-scroll-show-maximum-output)
    ;; This makes it really work to keep point at the bottom.
    (make-local-variable 'scroll-conservatively)
--- 512,518 ----
    (make-local-variable 'comint-input-sender)
    (make-local-variable 'comint-eol-on-send)
    (make-local-variable 'comint-scroll-to-bottom-on-input)
!   (make-local-variable 'comint-move-point-for-output)
    (make-local-variable 'comint-scroll-show-maximum-output)
    ;; This makes it really work to keep point at the bottom.
    (make-local-variable 'scroll-conservatively)
***************
*** 682,689 ****
  Blasts any old process running in the buffer.  Doesn't set the buffer mode.
  You can use this to cheaply run a series of processes in the same comint
  buffer.  The hook `comint-exec-hook' is run after each exec."
!   (save-excursion
!     (set-buffer buffer)
      (let ((proc (get-buffer-process buffer))) ; Blast any old process.
        (if proc (delete-process proc)))
      ;; Crank up a new process
--- 695,701 ----
  Blasts any old process running in the buffer.  Doesn't set the buffer mode.
  You can use this to cheaply run a series of processes in the same comint
  buffer.  The hook `comint-exec-hook' is run after each exec."
!   (with-current-buffer buffer
      (let ((proc (get-buffer-process buffer))) ; Blast any old process.
        (if proc (delete-process proc)))
      ;; Crank up a new process
***************
*** 737,743 ****
        (default-directory
          (if (file-accessible-directory-p default-directory)
              default-directory
!           (char-to-string directory-sep-char)))
        proc decoding encoding changed)
      (let ((exec-path (if (file-name-directory command)
                         ;; If the command has slashes, make sure we
--- 749,755 ----
        (default-directory
          (if (file-accessible-directory-p default-directory)
              default-directory
!           "/"))
        proc decoding encoding changed)
      (let ((exec-path (if (file-name-directory command)
                         ;; If the command has slashes, make sure we
***************
*** 1562,1568 ****
        (save-restriction
          (widen)
          (let ((inhibit-field-text-motion t)
!               (buffer-read-only nil))
            ;; CR LF -> LF
            ;; Note that this won't work properly when the CR and LF
            ;; are in different output chunks, but this is probably an
--- 1574,1580 ----
        (save-restriction
          (widen)
          (let ((inhibit-field-text-motion t)
!               (inhibit-read-only t))
            ;; CR LF -> LF
            ;; Note that this won't work properly when the CR and LF
            ;; are in different output chunks, but this is probably an
***************
*** 1601,1607 ****
            (setq functions (cdr functions))))
  
        ;; Insert STRING
!       (let ((buffer-read-only nil)
              ;; Avoid the overhead of save-excursion, since we just
              ;; fiddle with the point
              (saved-point (point-marker)))
--- 1613,1619 ----
            (setq functions (cdr functions))))
  
        ;; Insert STRING
!       (let ((inhibit-read-only t)
              ;; Avoid the overhead of save-excursion, since we just
              ;; fiddle with the point
              (saved-point (point-marker)))
***************
*** 1727,1742 ****
               nil t))))))
  
  (defun comint-postoutput-scroll-to-bottom (string)
!   "Go to the end of buffer in all windows showing it.
  Does not scroll if the current line is the last line in the buffer.
! Depends on the value of `comint-scroll-to-bottom-on-output' and
  `comint-scroll-show-maximum-output'.
  
  This function should be in the list `comint-output-filter-functions'."
    (let* ((selected (selected-window))
         (current (current-buffer))
         (process (get-buffer-process current))
!        (scroll comint-scroll-to-bottom-on-output))
      (unwind-protect
        (if process
            (walk-windows
--- 1739,1754 ----
               nil t))))))
  
  (defun comint-postoutput-scroll-to-bottom (string)
!   "Go to the end of buffer in some or all windows showing it.
  Does not scroll if the current line is the last line in the buffer.
! Depends on the value of `comint-move-point-for-output' and
  `comint-scroll-show-maximum-output'.
  
  This function should be in the list `comint-output-filter-functions'."
    (let* ((selected (selected-window))
         (current (current-buffer))
         (process (get-buffer-process current))
!        (scroll comint-move-point-for-output))
      (unwind-protect
        (if process
            (walk-windows
***************
*** 1772,1778 ****
      (goto-char (process-mark (get-buffer-process (current-buffer))))
      (forward-line (- comint-buffer-maximum-size))
      (beginning-of-line)
!     (delete-region (point-min) (point))))
  
  (defun comint-strip-ctrl-m (&optional string)
    "Strip trailing `^M' characters from the current output group.
--- 1784,1791 ----
      (goto-char (process-mark (get-buffer-process (current-buffer))))
      (forward-line (- comint-buffer-maximum-size))
      (beginning-of-line)
!     (let ((inhibit-read-only t))
!       (delete-region (point-min) (point)))))
  
  (defun comint-strip-ctrl-m (&optional string)
    "Strip trailing `^M' characters from the current output group.
***************
*** 1890,1896 ****
  Note that the keystrokes comprising the text can still be recovered
  \(temporarily) with \\[view-lossage].  Some people find this worrysome.
  Once the caller uses the password, it can erase the password
! by doing (fillarray STRING 0)."
    (let ((ans "")
        (newans nil)
        (c 0)
--- 1903,1909 ----
  Note that the keystrokes comprising the text can still be recovered
  \(temporarily) with \\[view-lossage].  Some people find this worrysome.
  Once the caller uses the password, it can erase the password
! by doing (clear-string STRING)."
    (let ((ans "")
        (newans nil)
        (c 0)
***************
*** 1917,1927 ****
            ((or (= c ?\r) (= c ?\n) (= c ?\e))
             (setq done t))
            ((= c ?\C-u)
!            (fillarray ans 0)
             (setq ans ""))
            ((and (/= c ?\b) (/= c ?\177))
             (setq newans (concat ans (char-to-string c)))
!            (fillarray ans 0)
             (setq ans newans))
            ((> (length ans) 0)
             (aset ans (1- (length ans)) 0)
--- 1930,1940 ----
            ((or (= c ?\r) (= c ?\n) (= c ?\e))
             (setq done t))
            ((= c ?\C-u)
!            (clear-string ans)
             (setq ans ""))
            ((and (/= c ?\b) (/= c ?\177))
             (setq newans (concat ans (char-to-string c)))
!            (clear-string ans)
             (setq ans newans))
            ((> (length ans) 0)
             (aset ans (1- (length ans)) 0)
***************
*** 2069,2075 ****
  between the process-mark and point."
    (interactive)
    (comint-skip-input)
!   (interrupt-process nil comint-ptyp))
  
  (defun comint-kill-subjob ()
    "Send kill signal to the current subjob.
--- 2082,2090 ----
  between the process-mark and point."
    (interactive)
    (comint-skip-input)
!   (interrupt-process nil comint-ptyp)
! ;;  (process-send-string nil "\n")
!   )
  
  (defun comint-kill-subjob ()
    "Send kill signal to the current subjob.
***************
*** 2672,2678 ****
         (dirsuffix (cond ((not comint-completion-addsuffix)
                           "")
                          ((not (consp comint-completion-addsuffix))
!                          (char-to-string directory-sep-char))
                          (t
                           (car comint-completion-addsuffix))))
         (filesuffix (cond ((not comint-completion-addsuffix)
--- 2687,2693 ----
         (dirsuffix (cond ((not comint-completion-addsuffix)
                           "")
                          ((not (consp comint-completion-addsuffix))
!                          "/")
                          (t
                           (car comint-completion-addsuffix))))
         (filesuffix (cond ((not comint-completion-addsuffix)
***************
*** 3379,3382 ****
--- 3394,3398 ----
  
  (provide 'comint)
  
+ ;;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164
  ;;; comint.el ends here




reply via email to

[Prev in Thread] Current Thread [Next in Thread]