home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!dplanet.ssf-sys.DHL.COM!ssf-sys.DHL.COM!mchen
- From: mchen@ssf-sys.DHL.COM (Mark Chen)
- Subject: Re: Remapping DEL key on a SUN4
- Reply-To: mchen@ssf-sys.DHL.COM (Mark Chen)
- Organization: DHL
- Date: Thu, 21 Jan 1993 19:30:24 GMT
- Message-ID: <1993Jan21.193024.18959@gateway.ssf-sys.DHL.COM>
- References: <1ifcu5INNmn5@agate.berkeley.edu> <1993Jan21.160833.18126@kth.se>
- Sender: news@gateway.ssf-sys.DHL.COM (DHL Netnews)
- Lines: 36
-
- In article <1ifcu5INNmn5@agate.berkeley.edu>, pedro@eerc.berkeley.edu
- (Peter Clark) writes:
- |> Hi all,
- |>
- |> I am using emacs 18.58 on a SUN 4 (Sparc 1) with a type 4 keyboard.
- |>
- |> I would like to remap the DEL key on the keypad from delete-backward-char
- |> to delete-char. I have tried in my .emacs
- |> (global-set-key "DEL" 'delete-char)
- |> (global-set-key "\DEL" 'delete-char)
- |> etc. to no avail.
- |>
- |> I did notice that I could do a
- |> M-x local-set-key DEL delete-char
- |> while running emacs and this worked OK.
- |>
- |> I've looked in the FAQ, I've tried everything, please help explain this!!!
- |>
- |> Thanks for all hints and pointers!
- |>
- |> Cheers, Peter Clark
- |> pedro@eerc.berkeley.edu
-
-
- The reason global-set-key doesn't work is that your DEL key (\C-?) is
- overridden locally by each of the modes. If you want to change it,
- you have to do it with mode hooks. For example:
-
- (defun reset-del ()
- (local-set-key "\C-?" 'delete-char))
-
- (setq text-mode-hook 'reset-del)
-
- -----
- Mark Chen
- mchen@ssf-sys.DHL.COM
-