home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / emacs / help / 4061 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.3 KB  |  34 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!psinntp!fims!poisson!chan
  3. From: chan@hawking.jpmorgan.com (Milo A. Chan)
  4. Subject: Re: Binding the DEL key.
  5. In-Reply-To: saj31052@uxa.cso.uiuc.edu's message of Mon, 31 Aug 1992 14:40:37 GMT
  6. Message-ID: <CHAN.92Sep9101354@hawking.jpmorgan.com>
  7. Sender: netnews@jpmorgan.com (Netnews Software)
  8. Organization: J. P. Morgan Securities, Inc.
  9. References: <BturFr.BB2@news.cso.uiuc.edu>
  10. Distribution: usa
  11. Date: Wed, 9 Sep 1992 15:13:54 GMT
  12. Lines: 20
  13.  
  14. In article <BturFr.BB2@news.cso.uiuc.edu> saj31052@uxa.cso.uiuc.edu (Scotty A Johnson) writes:
  15.  
  16.    I keep trying to bind the DEL key (^?), but no matter what I try,
  17.    emacs ALWAYS defines the key as backwards-delete-char-untabify.
  18.  
  19.    I have successfully bound meta-DEL and other keys.  Why the problem
  20.    with this one?
  21.  
  22. The DEL key is often bound by each major mode in a local keymap.  Try
  23. using the function local-set-key to set the DEL key (a.k.a. "\177") in the
  24. mode hook of the major mode you are using, such as c-mode-hook or
  25. emacs-lisp-mode-hook.  For example:
  26.  
  27.     (setq c-mode-hook
  28.       (function (lambda ()
  29.               (local-set-key "\177" 'my-delete-char))))
  30. --
  31. Milo Chan,  Fixed Income Market Strategies,  J.P. Morgan Securities, Inc.
  32. email:   chan_milo@jpmorgan.com    ...or...   chan@fractl.tn.cornell.edu
  33. phone:   212.648.4483              ...or...          212.648.4486 (sec'y)
  34.