Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0aeb71a7
Commit
0aeb71a7
authored
Aug 30, 2009
by
Stefan Monnier
Browse files
(comint-insert-input): Be careful to only set point if we
don't delegate to some other command.
parent
42371deb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/comint.el
lisp/comint.el
+13
-10
No files found.
lisp/ChangeLog
View file @
0aeb71a7
2009-08-30 Stefan Monnier <monnier@iro.umontreal.ca>
* 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).
...
...
lisp/comint.el
View file @
0aeb71a7
...
...
@@ -816,7 +816,9 @@ buffer. The hook `comint-exec-hook' is run after each exec."
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 @@ by the global keymap (usually `mouse-yank-at-click')."
(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
;; ===========================================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment