Charles Harrison Caudill wrote:
Hey, I'm looking for a way to do the following:
(add-hook 'mmm-mode-hook
(local-set-key "\C-\M-p" 'mmm-parse-buffer))
which 'works', the problem is that the output of the function is being
inserted into the main buffer instead of the echo area.
If I run:
M-x local-set-key: C-M-p to: mmm-parse-buffer it works just fine
how should the mode-hook be set up?
You want to defer evaluation of the (local-set-key ...) form, so quote
it with lambda to create a proper function object acceptable to add-hook:
(add-hook 'mmm-mode-hook
(lambda ()
(local-set-key "\C-\M-p" 'mmm-parse-buffer)))
Thanks guys
You're welcome.
Oh, and just for fun: I've managed to convert my roommate (Vim user of many
years) to emacs as of today.
Go emacs!
Bless you brother, another soul saved!
--
Kevin Rodgers
_______________________________________________
Help-gnu-emacs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs