Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!ICST-CMR.ARPA!rbj From: rbj@ICST-CMR.ARPA.UUCP Newsgroups: comp.emacs Subject: Re: Question/Suggestion on C-s/C-q question . . . Message-ID: <8703052020.AA08756@icst-cmr.arpa.ARPA> Date: Thu, 5-Mar-87 15:20:17 EST Article-I.D.: icst-cmr.8703052020.AA08756 Posted: Thu Mar 5 15:20:17 1987 Date-Received: Sat, 7-Mar-87 01:47:53 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 24 > Speaking off the top of my head, you have two main choices. You > can emulate and simplify the above to: > > (defun prefix-control () > "Make the next character act like the corresponding control character" > (interactive) > (setq prefix-arg current-prefix-arg > this-command last-command > unread-command-char (logand (read-char) 31))))) > ;; A more sophisticated version would map ? to DEL Here's where you become more sophisticated. You have just illustrated one of my pet peeves: special casing `?' in control code functions. Why do you think DEL is `^?'? There is a function that will map both letters AND the apparant special case `?': char XOR 64. Of course, this forces you to type ^A instead of ^a, so it is more useful as an output transformation than as an input one: ^a maps to `!'! It is amazing how many people don't know this trick, so don't feel bad. > Matt (Root Boy) Jim "Just Say Yes" Cottrell I think I am an overnight sensation right now!!