comparison lisp/comint.el @ 66971:537e6758bfe5

(comint-insert-input): Use `posn-set-point' instead of `mouse-set-point' because the latter is not fbound when configured without X.
author John Paul Wallington <jpw@pobox.com>
date Thu, 17 Nov 2005 22:58:11 +0000
parents 232f770dbf0f
children 3bd95f4f2941 7beb78bc1f8e
comparison
equal deleted inserted replaced
66970:d94285b2b933 66971:537e6758bfe5
797 "In a Comint buffer, set the current input to the previous input at point." 797 "In a Comint buffer, set the current input to the previous input at point."
798 ;; This doesn't use "e" because it is supposed to work 798 ;; This doesn't use "e" because it is supposed to work
799 ;; for events without parameters. 799 ;; for events without parameters.
800 (interactive (list last-input-event)) 800 (interactive (list last-input-event))
801 (let ((pos (point))) 801 (let ((pos (point)))
802 (if event (mouse-set-point event)) 802 (if event (posn-set-point (event-end event)))
803 (if (not (eq (get-char-property (point) 'field) 'input)) 803 (if (not (eq (get-char-property (point) 'field) 'input))
804 ;; No input at POS, fall back to the global definition. 804 ;; No input at POS, fall back to the global definition.
805 (let* ((keys (this-command-keys)) 805 (let* ((keys (this-command-keys))
806 (last-key (and (vectorp keys) (aref keys (1- (length keys))))) 806 (last-key (and (vectorp keys) (aref keys (1- (length keys)))))
807 (fun (and last-key (lookup-key global-map (vector last-key))))) 807 (fun (and last-key (lookup-key global-map (vector last-key)))))