Article View: gnu.emacs.help
Article #189544Re: local key bindings
From: Josh Mittleman
Date: Mon, 28 Jan 1991 15:35
Date: Mon, 28 Jan 1991 15:35
19 lines
1543 bytes
1543 bytes
Most modes have a local keymap, usually called something like modename-mode-map. For example, there is an rmail-mode-map. Most modes also have a mode-hook, called modename-mode-hook. A mode-hook is a variable which can be set to a function; if it is set, then those functions are run just after the mode is initialized. This allows you to customize the operation of the mode. So, to change some of the local bindings for rmail, you could add soemthing like this to your .emacs: (defun my-rmail-stuff () (define-key rmail-mode-map "\C-c\C-c" 'my-mail-send-and-exit)) (setq rmail-mode-hook 'my-rmail-stuff) -- ------------------------------------------------------------------------------ Joshua Mittleman (mittle@ibm.com or joshua@paul.rutgers.edu) J2-C28 T.J. Watson Research Institute, PO Box 704, Yorktown Heights, NY 10598
Technical Details
Message-ID:
<Jan.28.10.35.14.1991.28587@paul.rutgers.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!spool2.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!dimacs.rutgers.edu!aramis.rutgers.edu!paul.rutgers.edu!joshuaReferences:
<LYNN.91Jan25143703@jazz.phx.mcd.mot.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,4aaaa23329c12857 X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1991-01-28 12:10:40 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!spool2.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!dimacs.rutgers.edu!aramis.rutgers.edu!paul.rutgers.edu!joshua From: joshua@paul.rutgers.edu (Josh Mittleman) Newsgroups: gnu.emacs.help Subject: Re: local key bindings Message-ID: <Jan.28.10.35.14.1991.28587@paul.rutgers.edu> Date: 28 Jan 91 15:35:15 GMT References: <LYNN.91Jan25143703@jazz.phx.mcd.mot.com> Distribution: gnu Organization: Rutgers Univ., New Brunswick, N.J. Lines: 19