summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorDaniel Colascione <dancol@dancol.org>2014-03-30 12:12:57 -0700
committerDaniel Colascione <dancol@dancol.org>2014-03-30 12:12:57 -0700
commit1861d5a7121b349c4fb4db0ea06c898fcc85ca76 (patch)
tree3251b77f0af62fae9a1704d6836d07e644c93c09 /lisp/comint.el
parentf9d45267c81a05c1c7782aa38a1fcc018c013683 (diff)
downloademacs-1861d5a7121b349c4fb4db0ea06c898fcc85ca76.tar.gz
emacs-1861d5a7121b349c4fb4db0ea06c898fcc85ca76.tar.bz2
emacs-1861d5a7121b349c4fb4db0ea06c898fcc85ca76.zip
completion-in-region-mode improvements
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index ec11d5b162b..dfc3fee0884 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1769,6 +1769,12 @@ If the Comint is Lucid Common Lisp,
Similarly for Soar, Scheme, etc."
(interactive)
+ ;; If we're currently completing, stop. We're definitely done
+ ;; completing, and by sending the input, we might cause side effects
+ ;; that will confuse the code running in the completion
+ ;; post-command-hook.
+ (when completion-in-region-mode
+ (completion-in-region-mode -1))
;; Note that the input string does not include its terminal newline.
(let ((proc (get-buffer-process (current-buffer))))
(if (not proc) (user-error "Current buffer has no process")