[Top][All Lists]

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

Re: binding command to key

From: address@hidden
Subject: Re: binding command to key
Date: Sat, 18 Oct 2003 15:56:56 -0400
User-agent: KNode/0.7.1

Bob Smith wrote:

> Hi
> how do I bind the compile command to a function key, say F1?
> tia
> /B

I'm a writer so I never compile, but the general way to bind a key is with:

M-x global-set-key

Follow the prompts.

Note that this only works for the current session, that is, when you shut 
down Emacs it disappears. In the .gnu-emacs file there's a section on 
keybindings. Just go to it and replace the current command with what you 
like, save the file, then exit and start up Emacs. Then it'll work.

In mine the F1 key, which I think is at the default, is:

  (global-set-key [f1]    'help-for-help)    ; `Help'

Replace the help-for-help


Author of "Linux for Non-Geeks--Clear-eyed Answered for Practical Consumers" 
and "Boring Stories from Uncle Rod." Both are available at

To reply by e-mail, take the extra "o" out of the name.

reply via email to

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