home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / emacs / help / 5278 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  2.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!natinst.com!news.dell.com!texsun!digi!kgallagh
  2. From: kgallagh@digi.lonestar.org (Kevin Gallagher)
  3. Newsgroups: gnu.emacs.help
  4. Subject: Re: Remapping DEL key on a SUN4
  5. Message-ID: <1993Jan7.072629.24517@digi.lonestar.org>
  6. Date: 7 Jan 93 07:26:29 GMT
  7. References: <1ifcu5INNmn5@agate.berkeley.edu> <ETHANB.93Jan6163624@ptolemy.astro.washington.edu>
  8. Organization: DSC Communications Corp, Plano, TX
  9. Lines: 37
  10.  
  11. In article <ETHANB.93Jan6163624@ptolemy.astro.washington.edu> ethanb@ptolemy.astro.washington.edu (Ethan Bradford) writes:
  12. >In article <1ifcu5INNmn5@agate.berkeley.edu> pedro@eerc.berkeley.edu (Peter Clark) writes:
  13. >   I am using emacs 18.58 on a SUN 4 (Sparc 1) with a type 4 keyboard.
  14. >
  15. >   I would like to remap the DEL key on the keypad from delete-backward-char
  16. >   to delete-char.  I have tried in my .emacs
  17. >   (global-set-key "DEL" 'delete-char)
  18. >   (global-set-key "\DEL" 'delete-char)
  19. >   etc. to no avail.
  20. >
  21. >To insert the delete key between the quotes, move there and type
  22. >   C-Q <DEL>
  23. >(were by <DEL> I mean pressing the DEL key).
  24.  
  25. Using "\C-?" should also work.  C-? is fairly standard notation for the DEL
  26. character. 
  27.  
  28. However, this will not solve your problem, because most major modes redefine
  29. the binding of the DEL character one of the variations of
  30. delete-backward-char, like backward-delete-char-untabify, in the major mode
  31. local map, which overrides the global map.
  32.  
  33. >   I did notice that I could do a 
  34. >   M-x local-set-key DEL delete-char
  35. >   while running emacs and this worked OK.
  36.  
  37. Which changed the binding in the active buffer at the time you executed the
  38. local-set-key function.  Other buffers were not affected.
  39.  
  40. To change the binding in major modes that you use, you will have to use the
  41. setup hook for each major mode and assign the hook to a function which
  42. executes the local-set-key function to change the binding of DEL.
  43. -- 
  44. ----------------------------------------------------------------------------
  45. Kevin Gallagher        kgallagh@digi.lonestar.org OR ...!uunet!digi!kgallagh
  46. DSC Communications Corporation   Addr: MS 152, 1000 Coit Rd, Plano, TX 75075
  47. ----------------------------------------------------------------------------
  48.