aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorGrégoire Jadi2013-06-15 11:24:47 +0200
committerGrégoire Jadi2013-06-15 11:24:47 +0200
commit1a0f9e5e80586e4f2157fdfecae250c5619edf15 (patch)
treedbf9c38ab630787db0e41667efc19715f7d571b4 /lisp/term
parentc75684e7603cfea0ec91c63fca0187a5544245c8 (diff)
parent2a342ba649407875a265b8d56c9f7c3d87c4b43c (diff)
downloademacs-1a0f9e5e80586e4f2157fdfecae250c5619edf15.tar.gz
emacs-1a0f9e5e80586e4f2157fdfecae250c5619edf15.zip
Merge branch 'jave-xwidget' into xwidget
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/xterm.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 05a129225ee..86f4583b987 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -516,6 +516,9 @@ The relevant features are:
516 (terminal-init-xterm-modify-other-keys)))))) 516 (terminal-init-xterm-modify-other-keys))))))
517 517
518(defun xterm--query (query handlers) 518(defun xterm--query (query handlers)
519 "Send QUERY string to the terminal and watch for a response.
520HANDLERS is an alist with elements of the form (STRING . FUNCTION).
521We run the first FUNCTION whose STRING matches the input events."
519 ;; We used to query synchronously, but the need to use `discard-input' is 522 ;; We used to query synchronously, but the need to use `discard-input' is
520 ;; rather annoying (bug#6758). Maybe we could always use the asynchronous 523 ;; rather annoying (bug#6758). Maybe we could always use the asynchronous
521 ;; approach, but it's less tested. 524 ;; approach, but it's less tested.
@@ -544,7 +547,8 @@ The relevant features are:
544 nil)))) 547 nil))))
545 (setq i (1+ i))) 548 (setq i (1+ i)))
546 (if (= i (length (car handler))) 549 (if (= i (length (car handler)))
547 (funcall (cdr handler)) 550 (progn (setq handlers nil)
551 (funcall (cdr handler)))
548 (while (> i 0) 552 (while (> i 0)
549 (push (aref (car handler) (setq i (1- i))) 553 (push (aref (car handler) (setq i (1- i)))
550 unread-command-events))))))) 554 unread-command-events)))))))