help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

key binding question


From: Hadron
Subject: key binding question
Date: Sat, 10 Feb 2007 14:00:25 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]