From:	CRDGW2::CRDGW2::MRGATE::"SMTP::PREP.AI.MIT.EDU::INFO-GNU-EMACS-REQUEST"  1-NOV-1989 12:37
To:	MRGATE::"ARISIA::EVERHART"
Subj:	Re: How to enable flow control

Received: by life.ai.mit.edu (4.0/AI-4.10) id AA12339; Wed, 1 Nov 89 08:47:39 EST
Return-Path: <info-gnu-emacs-request@prep.ai.mit.edu>
Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.0/AI-4.10) id AA12274; Wed, 1 Nov 89 08:42:54 EST
Received: by tut.cis.ohio-state.edu (5.61/4.891101)
	id AA00541; Wed, 1 Nov 89 08:32:54 -0500
Received: from USENET by tut.cis.ohio-state.edu with netnews
	for info-gnu-emacs@prep.ai.mit.edu (info-gnu-emacs@prep.ai.mit.edu)
	(contact usenet@tut.cis.ohio-state.edu if you have questions)
Date: 1 Nov 89 17:27:18 GMT
From: mcsun!hp4nl!mhres!jv@uunet.uu.net  (Johan Vromans)
Organization: Multihouse Gouda, the Netherlands
Subject: Re: How to enable flow control
Message-Id: <JV.89Nov1102718@mhres.mh.nl>
References: <PCG.89Oct28135938@rupert.cs.aber.ac.uk>
Sender: info-gnu-emacs-request@prep.ai.mit.edu
To: info-gnu-emacs@prep.ai.mit.edu


In article <PCG.89Oct28135938@rupert.cs.aber.ac.uk> pcg@rupert.cs.aber.ac.uk (Piercarlo Grandi) writes:

> In a previous posting I gave the two commands I use to enable ^S/^Q to be
> used for in-band flow control, like many terminals require, and swap them
> around with ^\/^^, which are mostly unused on any Emacs.
> 
> Unfortunately I posted a part of my *bytecompiled* $HOME/.emacs file; this
> means that it contained unquoted control chars, that I patched up badly.
> 
> Here is the *real* source:

I have the following function in site-init.el. (It was the first elisp
code I wrote, as can probably be seen :-).

(defun xonxoff (on)
  "Set up GNU to use X-ON/X-OFF flow control.
Maps C-] to C-s and C-^ to C-Q.
With an argument: disables flow control and clears the mapping."
  (interactive "P")
  (cond 
   ((eq on nil)
    (setq keyboard-translate-table "\^@\^A\^B\^C\^D\^E\^F\^G\^H\^I\^J\^K\^L\^M\^N\^O\^P\^Q\^R\^S\^T\^U\^V\^W\^X\^Y\^Z\^\[\^\\\^\S\^Q")
    (set-input-mode nil t)
    (message "Flow control enabled, use C-] for C-S and C-^ for C-Q")
    )
   ((not (eq on nil))
    (setq keyboard-translate-table nil)
    (set-input-mode t nil)
    (message "Flow control disabled")
    )
   )
  )

; Johan
; --
--
Johan Vromans				       jv@mh.nl via internet backbones
Multihouse Automatisering bv		       uucp: ..!{uunet,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62944/62500
------------------------ "Arms are made for hugging" -------------------------
