# HG changeset patch # User Stefan Monnier # Date 1111699273 0 # Node ID 16de2600fc58ff4acb758caccd5a99c2b86be506 # Parent 0f9e0d89775197bfa91b5ed4d33831cace9ef576 (comint-insert-input): Obey mouse-yank-at-point. diff -r 0f9e0d897751 -r 16de2600fc58 lisp/comint.el --- a/lisp/comint.el Thu Mar 24 19:53:53 2005 +0000 +++ b/lisp/comint.el Thu Mar 24 21:21:13 2005 +0000 @@ -1,7 +1,7 @@ ;;; comint.el --- general command interpreter in a window stuff ;; Copyright (C) 1988, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Olin Shivers ;; Simon Marshall @@ -791,14 +791,16 @@ ;; This doesn't use "e" because it is supposed to work ;; for events without parameters. (interactive (list last-input-event)) - (if event (mouse-set-point event)) (let ((pos (point))) - (if (not (eq (get-char-property pos 'field) 'input)) + (if event (mouse-set-point event)) + (if (not (eq (get-char-property (point) 'field) 'input)) ;; No input at POS, fall back to the global definition. (let* ((keys (this-command-keys)) (last-key (and (vectorp keys) (aref keys (1- (length keys))))) (fun (and last-key (lookup-key global-map (vector last-key))))) + (goto-char pos) (and fun (call-interactively fun))) + (setq pos (point)) ;; There's previous input at POS, insert it at the end of the buffer. (goto-char (point-max)) ;; First delete any old unsent input at the end