Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!palkovic From: palkovic@linac.fnal.gov (palkovic@linac.fnal.gov (John A. Palkovic)) Newsgroups: comp.emacs Subject: Re: GNU Emacs on VMS [flow control] Summary: There's more than one way to skin a GNU Keywords: flow-control telnet VMS Message-ID: <2419@linac.fnal.gov> Date: 9 Oct 90 04:10:07 GMT References: <0093DE09.1FC12ABA@uinpla.npl.uiuc.edu> <1990Oct8.215804.11443@cbnewse.att.com> Reply-To: palkovic@linac.fnal.gov Organization: St. Bob's Cathedral of Accelerator Physics Lines: 43 In article <1990Oct8.215804.11443@cbnewse.att.com> danj1@ihlpa.att.com writes: >[he wanted help on flow control] [he posted a solution] From the FAQL posted once upon a time in gnu.emacs, this one rebinds the keys to C-. and C-\, so it won't hose telnet. It also gives you the capability to undo. Of course it can be hacked to rebind the keys to something else... -- (defun evade-flow-control () "Replace ^S with ^\\ and ^Q with ^." (interactive) (let ((the-table (make-string 128 0))) (let ((i 0)) (while (< i 128) (aset the-table i i) (setq i (1+ i)))) ;; Swap ^S and ^\ (aset the-table ?\034 ?\^s) (aset the-table ?\^s ?\034) ;; Swap ^Q and ^^ (aset the-table ?\036 ?\^q) (aset the-table ?\^q ?\036) (setq flow-control-evasion t) (setq keyboard-translate-table the-table))) (defun unevade-flow-control () "Return ^S and ^Q to their normal mappings." (interactive) (cond ((null flow-control-evasion) nil) (t ;;; Swap back ^S (aset keyboard-translate-table ?\034 ?\034) (aset keyboard-translate-table ?\^s ?\^s) ;; Swap ^Q and ^^ (aset keyboard-translate-table ?\036 ?\036) (aset keyboard-translate-table ?\^q ?\^q) (setq flow-control-evasion nil)))) -- John Palkovic {att,uunet}!tellab5!linac!palkovic palkovic@linac.fnal.gov, {att,uunet}!linac.fnal.gov!palkovic works too. Home: linac!jpmac!johnny