]> git.eshelyaron.com Git - sweep.git/commit
Set Prolog flag 'tty_control' to 'true' when using pty
authorEshel Yaron <me@eshelyaron.com>
Fri, 20 Oct 2023 14:51:15 +0000 (17:51 +0300)
committerEshel Yaron <me@eshelyaron.com>
Fri, 20 Oct 2023 15:47:09 +0000 (17:47 +0200)
commitd70195ede30df33098f58cc6ba5fd19c26495055
tree6f2b5506536aa8caaea1c32de02425b5868824bd
parentdec1eb089edf7d41745d1f7b5632533717d69301
Set Prolog flag 'tty_control' to 'true' when using pty

When 'sweeprolog-top-level-use-pty' is non-nil, let the Prolog
top-level thread know that it controls the tty.  This affects some
aspects of the top-level interaction, namely in the presence of choice
points.  A significant benefit is that Prolog ensures that the tty
does not echo input, so we can stop setting 'comint-process-echoes'
which had the adverse effect of blocking Emacs when output stalls on
non-echoing terminals.

* sweep.pl (sweep_top_level_client/3): Become
'sweep_top_level_client/4'.  New argument says whether the top-level
controls the tty.
(sweep_top_level_pty_client/1,sweep_top_level_server_loop_/2): Adjust.
* sweeprolog.el (sweeprolog-top-level-buffer): Stop setting
'comint-process-echoes'.
(sweeprolog-top-level--post-self-insert-function): When using a tty,
send single character responses directly and assume that the top-level
echoes them back.
sweep.pl
sweeprolog.el