]> code.delx.au - gnu-emacs/commitdiff
(comint-insert-input): Delete obsolete comment.
authorRomain Francoise <romain@orebokech.com>
Sat, 9 Dec 2006 11:14:35 +0000 (11:14 +0000)
committerRomain Francoise <romain@orebokech.com>
Sat, 9 Dec 2006 11:14:35 +0000 (11:14 +0000)
Examine input field without moving point.

lisp/ChangeLog
lisp/comint.el

index 1c85c23e720f1aae7eef8671f2e78cef247756a1..09e3736df707293fd48d5fe22c0702407082b9d1 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-09  Romain Francoise  <romain@orebokech.com>
+
+       * comint.el (comint-insert-input): Delete obsolete comment.
+       Examine input field without moving point.
+
 2006-12-08  Kevin Rodgers  <ihs_4664@yahoo.com>
 
        * files.el (insert-file-1): Compare file size to
index 191807af847158b788585ec3d7bdf88b130269fb..948057c6bc2d02a8566c0fd92952dc32c7c9533d 100644 (file)
@@ -804,11 +804,10 @@ buffer.  The hook `comint-exec-hook' is run after each exec."
 
 (defun comint-insert-input (event)
   "In a Comint buffer, set the current input to the previous input at point."
-  ;; This doesn't use "e" because it is supposed to work
-  ;; for events without parameters.
   (interactive "e")
-  (mouse-set-point event)
-  (let ((pos (point)))
+  ;; Note: be careful not to move point in this function, it would
+  ;; defeat `mouse-yank-at-point' in case we fall back to a yank.
+  (let ((pos (posn-point (event-end event))))
     (if (not (eq (field-at-pos pos) 'input))
        ;; No input at POS, fall back to the global definition.
        (let* ((keys (this-command-keys))