Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!arisia!roo!mdixon From: mdixon@parc.xerox.com (Mike Dixon) Newsgroups: comp.sys.next Subject: making editmode=emacs *really* work Message-ID: Date: 4 Jul 90 03:13:41 GMT Sender: news@parc.xerox.com Distribution: comp Organization: Xerox PARC, Palo Alto, CA Lines: 35 so i got a copy of Stuart, and was happy -- here's a terminal/shell program that does the right thing. scrollback, cut/paste, full vt100 emulation, and a meta-key. then it occured to me that i could start using the editmode=emacs feature of NeXT's csh -- quite a win, if you already use emacs. except that i wanted to use the meta-key for things like meta-b, and csh uses an esc prefix instead. i'd have thought i'd be able to rebind it, but csh carefully strips the meta bit from each character before it looks at it (even after you've said 'stty pass8' to stop the tty handler from grabbing it). so... here are two patches to csh to (a) stop it from stripping the meta bit, and (b) restore esc completion (editmode=emacs normally makes it take 2 escapes to do a completion). if you can figure out how to apply these, i'll assume you're clever enough not to clobber your only copy of csh and thus i'm omitting all the obvious warnings about that. as an added bonus, as soon as you turn meta-bits on, the bindings that were set up for an esc-prefix start working with the meta-key! at offset 66169 in /bin/csh, change 0x0212007f to 0x021200ff (don't mask off the meta-bit) at offset 66661 in /bin/csh, change 0x4e56000023f9 to 0x4ef9000131a8 (single escape completion) once you've done this, add 'stty pass8' to your .login, set the hacked copy of csh as your Shell default in Stuart, and you're ready to roll. (sources? we don't need your steenking sources...) -- .mike.