|
From: | Kevin Rodgers |
Subject: | Re: key binding question |
Date: | Sun, 11 Feb 2007 21:42:37 -0700 |
User-agent: | Thunderbird 1.5.0.9 (Macintosh/20061207) |
Hadron wrote:
Is it to add a new key binding to be local to a specific mode by adding a hook e.g (add-hook 'html-mode-hook (lambda () (local-set-key [f10] 'myfunc))) or to use define-key on the specific mode-map?e.g (define-key html-mode-map [f11] 'myfunc) (assume the html-mode-map variable is instantiated/inscope. Or to ask another way, why would you choose one over the other and what might the pitfalls be?
I use the mode hook, because I have an aversion to keymap variable names :-) and because it doesn't require the package to be loaded. -- Kevin Rodgers Denver, Colorado, USA
[Prev in Thread] | Current Thread | [Next in Thread] |