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

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

Re: output-supression


From: Kevin Rodgers
Subject: Re: output-supression
Date: Tue, 15 Feb 2005 11:42:12 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

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

reply via email to

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