Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!husc6!necntc!ima!think!fad From: fad@think.COM (franklin a davis) Newsgroups: comp.emacs Subject: C-S again Keywords: Flow Control, xon, xoff C-S, C-Q Message-ID: <22106@think.UUCP> Date: 16 Jun 88 18:32:43 GMT References: <5700@columbia.edu> Sender: usenet@think.UUCP Reply-To: fad@think.com (franklin a davis) Organization: Thinking Machines Corporation Lines: 68 In article <5700@columbia.edu> agw@columbia.edu (Art Werschulz) writes: >Could somebody send me the keyboard-translation-table that should be set up >so that C-\ could do whatever C-S is supposed to? This file should be part of the distribution, because there will always be people who need it! ; xonxoff.el -- use control flow in gnuemacs ;kuling:/usr/alla/christer/emacs/xonxoff.el, thu apr 10 20:50:38 1986, ; edit by: christer johansson (christer@kuling) ; changed docstring of xon-xoff-mode. removed -*- line. ;edited: tue nov 19 1985 by christer@kuling (christer johansson) ; /usr/alla/christer/emacs/xonxoff.el added variables c-{s,q}-replacement. ;edited: mon nov 11 1985 by christer@kuling (christer johansson) ; /usr/alla/christer/emacs/xonxoff.el works under ver. 16.60 ;installed 4/28/86 by mark ardis at wang institute ;; make the identity translation table. (progn (setq keyboard-translate-table (make-string 128 0)) (let ((i 0)) (while (< i 128) (aset keyboard-translate-table i i) (setq i (1+ i))))) (defvar xon-xoff-mode t "controls the xon-xoff mode. if this variable is nil, xon-xoff-mode is off.") (defun xon-xoff-mode (arg) "xon-xoff mode's good if you want too use ^s and ^q for flow-control. turns xon-xoff mode on if arg > 0, off if arg < 0. with arg = 0, xon-xoff-mode toggles. if xon-xoff-mode is on, all ^^ typed by the user will be translated to ^q before they are interpreted in any way. likewise ^\ will be translated to ^s. If the options C-Q-Replacement and C-S-Replacement are set, there values will be used instead of ^^ and ^\. ^q and ^s will be used for flow-controll in xon-xoff-mode. " (interactive "p") (setq xon-xoff-mode (if (and (zerop arg) (boundp xon-xoff-mode)) (not xon-xoff-mode) (> arg 0))) (set-input-mode nil xon-xoff-mode) (if xon-xoff-mode (progn (aset keyboard-translate-table (if (boundp 'C-S-Replacement) C-S-Replacement ?\^\\) ?\^s) (aset keyboard-translate-table (if (boundp 'C-Q-Replacement) C-Q-Replacement ?\^^) ?\^q)) (aset keyboard-translate-table ?\^s ?\^s) (aset keyboard-translate-table ?\^q ?\^q))) (xon-xoff-mode 1) franklin a davis Thinking Machines Corp. Cambridge, MA 02142 617-876-1111 {ihnp4, harvard, seismo}!think!fad "Roll away...the dew!"