On Tue, Dec 1, 2009 at 1:34 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> --- emacs-23.0.93/lisp/comint.el 2009-01-06 13:29:03.000000000 -0700Thanks. This has been fixed by never calling mouse-set-point here.
> +++ emacs/lisp/comint.el 2009-05-14 17:31:05.000000000 -0600
> @@ -816,7 +816,7 @@
> If there is no previous input at point, run the command specified
> by the global keymap (usually `mouse-yank-at-point')."
> (interactive "e")
> - (mouse-set-point event)
> + (unless mouse-yank-at-point (mouse-set-point event))
> (let ((pos (posn-point (event-end event)))
> field input)
> (with-selected-window (posn-window (event-end event))
I'm not sure fixing it in field-at-pos is right, so I fixed it in
> (defun field-at-pos (pos)
> "Return the field at position POS, taking stickiness etc into account."
> - (let ((raw-field (get-char-property (field-beginning pos) 'field)))
> - (if (eq raw-field 'boundary)
> - (get-char-property (1- (field-end pos)) 'field)
> - raw-field)))
> + (if (< pos (field-end pos))
> + (let ((raw-field (get-char-property (field-beginning pos) 'field)))
> + (if (eq raw-field 'boundary)
> + (get-char-property (1- (field-end pos)) 'field)
> + raw-field))))
a similar way in cominut-insert-input. Thank you for your help,