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
909a9182
Commit
909a9182
authored
Mar 09, 2001
by
Gerd Moellmann
Browse files
(comint-insert-clicked-input): Use the last key
from this-command-keys to lookup the global key definition.
parent
95522746
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lisp/comint.el
lisp/comint.el
+5
-4
No files found.
lisp/comint.el
View file @
909a9182
...
...
@@ -784,7 +784,7 @@ buffer. The hook `comint-exec-hook' is run after each exec."
(dolist (ov (overlays-at (posn-point (event-end event))))
(when (eq (overlay-get ov 'field) 'input)
(throw 'found ov))))))
;;
d
o we have input in this area?
;;
D
o we have input in this area?
(if over
(let ((input-str (buffer-substring (overlay-start over)
(overlay-end over))))
...
...
@@ -794,9 +794,10 @@ buffer. The hook `comint-exec-hook' is run after each exec."
(process-mark (get-buffer-process (current-buffer))))
(point))
(insert input-str))
;; fall back to the user's previous definition if we aren't
;; on previous input region.
(let ((fun (lookup-key global-map (this-command-keys))))
;; Fall back to the global definition.
(let* ((keys (this-command-keys))
(last-key (and (vectorp keys) (aref keys (1- (length keys)))))
(fun (and last-key (lookup-key global-map (vector last-key)))))
(if fun (call-interactively fun))))))
...
...
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