aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2009-08-30 05:10:22 +0000
committerStefan Monnier2009-08-30 05:10:22 +0000
commit0aeb71a7e277bcf766f1c45bb0d26d6115482d9d (patch)
treed1414a8c55797fbc23976c5387727cb3a1d62117 /lisp
parent42371deb98aa593ed1ce2a680f0d5fd0418243f4 (diff)
downloademacs-0aeb71a7e277bcf766f1c45bb0d26d6115482d9d.tar.gz
emacs-0aeb71a7e277bcf766f1c45bb0d26d6115482d9d.zip
(comint-insert-input): Be careful to only set point if we
don't delegate to some other command.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/comint.el23
2 files changed, 16 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c67c63953f5..8bfd1dfa019 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12009-08-30 Stefan Monnier <monnier@iro.umontreal.ca> 12009-08-30 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * comint.el (comint-insert-input): Be careful to only set point if we
4 don't delegate to some other command.
5
3 * proced.el (proced-signal-list): Make it an alist. 6 * proced.el (proced-signal-list): Make it an alist.
4 (proced-grammar-alist): Capitalize names. 7 (proced-grammar-alist): Capitalize names.
5 (proced-send-signal): Use a non-hidden buffer (since it's displayed). 8 (proced-send-signal): Use a non-hidden buffer (since it's displayed).
diff --git a/lisp/comint.el b/lisp/comint.el
index 4fa9f7c3ced..69fd32d9b3b 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -816,7 +816,9 @@ buffer. The hook `comint-exec-hook' is run after each exec."
816If there is no previous input at point, run the command specified 816If there is no previous input at point, run the command specified
817by the global keymap (usually `mouse-yank-at-click')." 817by the global keymap (usually `mouse-yank-at-click')."
818 (interactive "e") 818 (interactive "e")
819 (mouse-set-point event) 819 ;; Don't set the mouse here, since it may otherwise change the behavior
820 ;; of the command on which we fallback if there's no field at point.
821 ;; (mouse-set-point event)
820 (let ((pos (posn-point (event-end event))) 822 (let ((pos (posn-point (event-end event)))
821 field input) 823 field input)
822 (with-selected-window (posn-window (event-end event)) 824 (with-selected-window (posn-window (event-end event))
@@ -833,15 +835,16 @@ by the global keymap (usually `mouse-yank-at-click')."
833 (fun (and last-key (lookup-key global-map (vector last-key))))) 835 (fun (and last-key (lookup-key global-map (vector last-key)))))
834 (and fun (not (eq fun 'comint-insert-input)) 836 (and fun (not (eq fun 'comint-insert-input))
835 (call-interactively fun))) 837 (call-interactively fun)))
836 ;; Otherwise, insert the previous input. 838 (with-selected-window (posn-window (event-end event))
837 (goto-char (point-max)) 839 ;; Otherwise, insert the previous input.
838 ;; First delete any old unsent input at the end 840 (goto-char (point-max))
839 (delete-region 841 ;; First delete any old unsent input at the end
840 (or (marker-position comint-accum-marker) 842 (delete-region
841 (process-mark (get-buffer-process (current-buffer)))) 843 (or (marker-position comint-accum-marker)
842 (point)) 844 (process-mark (get-buffer-process (current-buffer))))
843 ;; Insert the input at point 845 (point))
844 (insert input)))) 846 ;; Insert the input at point
847 (insert input)))))
845 848
846;; Input history processing in a buffer 849;; Input history processing in a buffer
847;; =========================================================================== 850;; ===========================================================================