Emacs key binding to run make
I am working on a C++ project and I want to bind the F10 key in order for t开发者_开发问答he tests to run. The tests are the default target of a Makefile. How can I do this?
To literally do what you want:
(local-set-key [(f10)] (lambda () (interactive)(compile "make")))
However, you can use keyboard macros solve general problems like this in future. Or use `repeat-last-complex-command' to look at the Lisp form of your last action to use in your own definition.
Bind f10 to the command compile
.
精彩评论