# HG changeset patch # User Stefan Monnier # Date 1251609022 0 # Node ID f1f277c6c9fe0ef097f97d2f67517240ae549911 # Parent 8bd22a0db033b6a05a48420285e4d56439cd42a9 (comint-insert-input): Be careful to only set point if we don't delegate to some other command. diff -r 8bd22a0db033 -r f1f277c6c9fe lisp/ChangeLog --- a/lisp/ChangeLog Sun Aug 30 05:00:59 2009 +0000 +++ b/lisp/ChangeLog Sun Aug 30 05:10:22 2009 +0000 @@ -1,5 +1,8 @@ 2009-08-30 Stefan Monnier + * comint.el (comint-insert-input): Be careful to only set point if we + don't delegate to some other command. + * proced.el (proced-signal-list): Make it an alist. (proced-grammar-alist): Capitalize names. (proced-send-signal): Use a non-hidden buffer (since it's displayed). diff -r 8bd22a0db033 -r f1f277c6c9fe lisp/comint.el --- a/lisp/comint.el Sun Aug 30 05:00:59 2009 +0000 +++ b/lisp/comint.el Sun Aug 30 05:10:22 2009 +0000 @@ -816,7 +816,9 @@ If there is no previous input at point, run the command specified by the global keymap (usually `mouse-yank-at-click')." (interactive "e") - (mouse-set-point event) + ;; Don't set the mouse here, since it may otherwise change the behavior + ;; of the command on which we fallback if there's no field at point. + ;; (mouse-set-point event) (let ((pos (posn-point (event-end event))) field input) (with-selected-window (posn-window (event-end event)) @@ -833,15 +835,16 @@ (fun (and last-key (lookup-key global-map (vector last-key))))) (and fun (not (eq fun 'comint-insert-input)) (call-interactively fun))) - ;; Otherwise, insert the previous input. - (goto-char (point-max)) - ;; First delete any old unsent input at the end - (delete-region - (or (marker-position comint-accum-marker) - (process-mark (get-buffer-process (current-buffer)))) - (point)) - ;; Insert the input at point - (insert input)))) + (with-selected-window (posn-window (event-end event)) + ;; Otherwise, insert the previous input. + (goto-char (point-max)) + ;; First delete any old unsent input at the end + (delete-region + (or (marker-position comint-accum-marker) + (process-mark (get-buffer-process (current-buffer)))) + (point)) + ;; Insert the input at point + (insert input))))) ;; Input history processing in a buffer ;; ===========================================================================