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


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/comint.el
Date: Mon, 10 Jun 2002 02:20:33 -0400

Index: emacs/lisp/comint.el
diff -c emacs/lisp/comint.el:1.270 emacs/lisp/comint.el:1.271
*** emacs/lisp/comint.el:1.270  Thu Apr 18 15:41:57 2002
--- emacs/lisp/comint.el        Mon Jun 10 02:20:33 2002
***************
*** 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
  ;;    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, 2001, 2002
  ;;    Free Software Foundation, Inc.
  
  ;; Author: Olin Shivers <address@hidden>
***************
*** 204,229 ****
                 (other :tag "on" t))
    :group 'comint)
  
- (defcustom comint-highlight-input t
-   "*If non-nil, highlight input; also allow choosing previous input with a 
mouse.
- The face used is `comint-highlight-input'."
-   :type 'boolean
-   :group 'comint)
- 
  (defface comint-highlight-input '((t (:weight bold)))
!   "Face to use to highlight input when `comint-highlight-input' is non-nil."
!   :group 'comint)
! 
! (defcustom comint-highlight-prompt t
!   "*If non-nil, highlight program prompts.
! The face used is `comint-highlight-prompt'."
!   :type 'boolean
    :group 'comint)
  
  (defface comint-highlight-prompt
    '((((background dark)) (:foreground "cyan"))
      (t (:foreground "dark blue")))
!   "Face to use to highlight prompt when `comint-highlight-prompt' is non-nil."
    :group 'comint)
  
  (defcustom comint-input-ignoredups nil
--- 204,217 ----
                 (other :tag "on" t))
    :group 'comint)
  
  (defface comint-highlight-input '((t (:weight bold)))
!   "Face to use to highlight user input."
    :group 'comint)
  
  (defface comint-highlight-prompt
    '((((background dark)) (:foreground "cyan"))
      (t (:foreground "dark blue")))
!   "Face to use to highlight prompts."
    :group 'comint)
  
  (defcustom comint-input-ignoredups nil
***************
*** 521,526 ****
--- 509,516 ----
    (make-local-variable 'comint-file-name-chars)
    (make-local-variable 'comint-file-name-quote-list)
    (set (make-local-variable 'comint-accum-marker) (make-marker))
+   (set (make-local-variable 'font-lock-defaults)
+        '(nil t nil nil nil (font-lock-core-only . t)))
    ;; This behavior is not useful in comint buffers, and is annoying
    (set (make-local-variable 'next-line-add-newlines) nil))
  
***************
*** 1469,1481 ****
                  ;; `boundary' field to make cursor movement between input
                  ;; and output fields smoother.
                  (overlay-put over 'field 'input))
!               (when comint-highlight-input
!                 (overlay-put over 'face 'comint-highlight-input)
!                 (overlay-put over 'mouse-face 'highlight)
!                 (overlay-put over
!                              'help-echo
!                              "mouse-2: insert after prompt as new input")
!                 (overlay-put over 'evaporate t))))
            (unless comint-use-prompt-regexp-instead-of-fields
              ;; Make an overlay for the terminating newline
              (let ((over (make-overlay end (1+ end) nil t nil)))
--- 1459,1470 ----
                  ;; `boundary' field to make cursor movement between input
                  ;; and output fields smoother.
                  (overlay-put over 'field 'input))
!               (overlay-put over 'font-lock-face 'comint-highlight-input)
!               (overlay-put over 'mouse-face 'highlight)
!               (overlay-put over
!                            'help-echo
!                            "mouse-2: insert after prompt as new input")
!               (overlay-put over 'evaporate t)))
            (unless comint-use-prompt-regexp-instead-of-fields
              ;; Make an overlay for the terminating newline
              (let ((over (make-overlay end (1+ end) nil t nil)))
***************
*** 1698,1720 ****
                  (overlay-put over 'evaporate t)
                  (setq comint-last-output-overlay over))))
  
!           (when comint-highlight-prompt
!             ;; Highlight the prompt, where we define `prompt' to mean
!             ;; the most recent output that doesn't end with a newline.
!             (unless (and (bolp) (null comint-last-prompt-overlay))
!               ;; Need to create or move the prompt overlay (in the case
!               ;; where there is no prompt ((bolp) == t), we still do
!               ;; this if there's already an existing overlay).
!               (let ((prompt-start (save-excursion (forward-line 0) (point))))
!                 (if comint-last-prompt-overlay
!                     ;; Just move an existing overlay
!                     (move-overlay comint-last-prompt-overlay
!                                   prompt-start (point))
!                   ;; Need to create the overlay
!                   (setq comint-last-prompt-overlay
!                         (make-overlay prompt-start (point)))
!                   (overlay-put comint-last-prompt-overlay
!                                'face 'comint-highlight-prompt)))))
  
            (goto-char saved-point)
  
--- 1687,1708 ----
                  (overlay-put over 'evaporate t)
                  (setq comint-last-output-overlay over))))
  
!           ;; Highlight the prompt, where we define `prompt' to mean
!           ;; the most recent output that doesn't end with a newline.
!           (unless (and (bolp) (null comint-last-prompt-overlay))
!             ;; Need to create or move the prompt overlay (in the case
!             ;; where there is no prompt ((bolp) == t), we still do
!             ;; this if there's already an existing overlay).
!             (let ((prompt-start (save-excursion (forward-line 0) (point))))
!               (if comint-last-prompt-overlay
!                   ;; Just move an existing overlay
!                   (move-overlay comint-last-prompt-overlay
!                                 prompt-start (point))
!                 ;; Need to create the overlay
!                 (setq comint-last-prompt-overlay
!                       (make-overlay prompt-start (point)))
!                 (overlay-put comint-last-prompt-overlay
!                              'font-lock-face 'comint-highlight-prompt))))
  
            (goto-char saved-point)
  



reply via email to

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