Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!keysec!gm From: gm@keysec.kse.com (Greg McGary) Newsgroups: gnu.emacs Subject: Re: how to use emacs with 'backspace' as 'delete' Message-ID: <1990Feb3.135813.16750@keysec.kse.com> Date: 3 Feb 90 13:58:13 GMT References: <7813@chaph.usc.edu> Reply-To: gm@keysec.UUCP (Greg McGary) Organization: Key Systems Engineering, Reston Lines: 25 In article <7813@chaph.usc.edu> kondaman@aludra.usc.edu (Arjun Krishna Kondamani) writes: >The location of >the 'backspace' and 'delete' keys is such that I prefer to use the >'backspace' key to delete text rather than the 'delete' key itself. (defun swap-ctl-h-and-del () "Swap the C-h and C-? keys at the lowest level. Beware, this will swap related key-sequences as well: e.g., C-M-h and C-M-?" (interactive) ;; First make a translate table that does the identity translation. (setq keyboard-translate-table (make-string 128 0)) (let ((i 0)) (while (< i 128) (aset keyboard-translate-table i i) (setq i (1+ i)))) ;; Now alter translations of some characters. (aset keyboard-translate-table ?\C-? ?\C-h) (aset keyboard-translate-table ?\C-h ?\C-?)) (swap-ctl-h-and-del) -- -- Greg McGary -- Key Systems Engineering -- Work: (703) 742-7870 Home: (703) 352-0407 -- gm@kse.com, gm@cs.duke.edu, ..!uunet!keysec!gm