[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mouse-yank-at-point in Comint modes
From: |
Stefan Monnier |
Subject: |
Re: mouse-yank-at-point in Comint modes |
Date: |
Tue, 01 Dec 2009 15:34:37 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
> --- emacs-23.0.93/lisp/comint.el 2009-01-06 13:29:03.000000000 -0700
> +++ 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))
Thanks. This has been fixed by never calling mouse-set-point here.
> (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))))
I'm not sure fixing it in field-at-pos is right, so I fixed it in
a similar way in cominut-insert-input. Thank you for your help,
Stefan
- Re: mouse-yank-at-point in Comint modes,
Stefan Monnier <=