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 [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/comint.el [emacs-unicode-2]
Date: Tue, 29 Jun 2004 13:25:43 -0400

Index: emacs/lisp/comint.el
diff -c emacs/lisp/comint.el:1.289.2.2 emacs/lisp/comint.el:1.289.2.3
*** emacs/lisp/comint.el:1.289.2.2      Mon Jun 28 07:28:26 2004
--- emacs/lisp/comint.el        Tue Jun 29 16:44:52 2004
***************
*** 571,577 ****
    (define-key comint-mode-map "\C-c\C-c" 'comint-interrupt-subjob)
    (define-key comint-mode-map "\C-c\C-z" 'comint-stop-subjob)
    (define-key comint-mode-map "\C-c\C-\\" 'comint-quit-subjob)
!   (define-key comint-mode-map "\C-c\C-m" 'comint-copy-old-input)
    (define-key comint-mode-map "\C-c\C-o" 'comint-delete-output)
    (define-key comint-mode-map "\C-c\C-r" 'comint-show-output)
    (define-key comint-mode-map "\C-c\C-e" 'comint-show-maximum-output)
--- 571,577 ----
    (define-key comint-mode-map "\C-c\C-c" 'comint-interrupt-subjob)
    (define-key comint-mode-map "\C-c\C-z" 'comint-stop-subjob)
    (define-key comint-mode-map "\C-c\C-\\" 'comint-quit-subjob)
!   (define-key comint-mode-map "\C-c\C-m" 'comint-insert-input)
    (define-key comint-mode-map "\C-c\C-o" 'comint-delete-output)
    (define-key comint-mode-map "\C-c\C-r" 'comint-show-output)
    (define-key comint-mode-map "\C-c\C-e" 'comint-show-maximum-output)
***************
*** 582,588 ****
    (define-key comint-mode-map "\C-c\C-s" 'comint-write-output)
    (define-key comint-mode-map "\C-c." 'comint-insert-previous-argument)
    ;; Mouse Buttons:
!   (define-key comint-mode-map [mouse-2] 'comint-insert-clicked-input)
    ;; Menu bars:
    ;; completion:
    (define-key comint-mode-map [menu-bar completion]
--- 582,588 ----
    (define-key comint-mode-map "\C-c\C-s" 'comint-write-output)
    (define-key comint-mode-map "\C-c." 'comint-insert-previous-argument)
    ;; Mouse Buttons:
!   (define-key comint-mode-map [mouse-2] 'comint-mouse-insert-input)
    ;; Menu bars:
    ;; completion:
    (define-key comint-mode-map [menu-bar completion]
***************
*** 615,621 ****
    (define-key comint-mode-map [menu-bar inout kill-input]
      '("Kill Current Input" . comint-kill-input))
    (define-key comint-mode-map [menu-bar inout copy-input]
!     '("Copy Old Input" . comint-copy-old-input))
    (define-key comint-mode-map [menu-bar inout forward-matching-history]
      '("Forward Matching Input..." . comint-forward-matching-input))
    (define-key comint-mode-map [menu-bar inout backward-matching-history]
--- 615,621 ----
    (define-key comint-mode-map [menu-bar inout kill-input]
      '("Kill Current Input" . comint-kill-input))
    (define-key comint-mode-map [menu-bar inout copy-input]
!     '("Copy Old Input" . comint-insert-input))
    (define-key comint-mode-map [menu-bar inout forward-matching-history]
      '("Forward Matching Input..." . comint-forward-matching-input))
    (define-key comint-mode-map [menu-bar inout backward-matching-history]
***************
*** 798,808 ****
        (set-process-coding-system proc decoding encoding))
      proc))
  
! 
! (defun comint-insert-clicked-input (event)
!   "In a Comint buffer, set the current input to the clicked-on previous 
input."
!   (interactive "e")
!   (let ((pos (posn-point (event-end event))))
      (if (not (eq (get-char-property pos 'field) 'input))
        ;; No input at POS, fall back to the global definition.
        (let* ((keys (this-command-keys))
--- 798,807 ----
        (set-process-coding-system proc decoding encoding))
      proc))
  
! (defun comint-insert-input ()
!   "In a Comint buffer, set the current input to the previous input at point."
!   (interactive)
!   (let ((pos (point)))
      (if (not (eq (get-char-property pos 'field) 'input))
        ;; No input at POS, fall back to the global definition.
        (let* ((keys (this-command-keys))
***************
*** 816,826 ****
         (or (marker-position comint-accum-marker)
           (process-mark (get-buffer-process (current-buffer))))
         (point))
!       ;; Insert the clicked-upon input
        (insert (buffer-substring-no-properties
               (previous-single-char-property-change (1+ pos) 'field)
               (next-single-char-property-change pos 'field))))))
  
  
  
  ;; Input history processing in a buffer
--- 815,830 ----
         (or (marker-position comint-accum-marker)
           (process-mark (get-buffer-process (current-buffer))))
         (point))
!       ;; Insert the input at point
        (insert (buffer-substring-no-properties
               (previous-single-char-property-change (1+ pos) 'field)
               (next-single-char-property-change pos 'field))))))
  
+ (defun comint-mouse-insert-input (event)
+   "In a Comint buffer, set the current input to the previous input you click 
on."
+   (interactive "e")
+   (mouse-set-point event)
+   (comint-insert-input)) 
  
  
  ;; Input history processing in a buffer
***************
*** 1858,1874 ****
        (comint-bol)
        (buffer-substring-no-properties (point) (line-end-position)))))
  
- (defun comint-copy-old-input ()
-   "Insert after prompt old input at point as new input to be edited.
- Calls `comint-get-old-input' to get old input."
-   (interactive)
-   (let ((input (funcall comint-get-old-input))
-       (process (get-buffer-process (current-buffer))))
-     (if (not process)
-       (error "Current buffer has no process")
-       (goto-char (process-mark process))
-       (insert input))))
- 
  (defun comint-skip-prompt ()
    "Skip past the text matching regexp `comint-prompt-regexp'.
  If this takes us past the end of the current line, don't skip at all."
--- 1862,1867 ----




reply via email to

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