PDA

View Full Version : customization of M-compile shortcut key in emacs



monkeyking
January 10th, 2007, 05:27 PM
I want to compile my sourcefile from within emacs.
I have a working Makefile,
and would simply like the,

M-compile
command to be called when I press, something like

C-c C-c
So that the buffercommandline asks

Compile command: make -k

-------------------------------------------------------------
Thanks in advance.

boirax
June 14th, 2008, 04:35 PM
Hi,

I think


C-c C-c

adds a comment (at least in c++ Abbrev mode)

In principle you can add to your .emacs file,


(global-set-key [SOME KEY YOU CHOOSE] 'compile)

Just choose it so that it doesn't interfere with other stuff you use.

for example I have,


(global-set-key [f12] 'compile)

in my .emacs.

monkeyking
August 21st, 2008, 07:51 PM
Hi, that works perfectly,
thanks.

:)