Dov Grobgeld
Dov Grobgeld

Reputation: 4983

Invoking an elisp function and make it prompt for input

In a function that I am writing myself, I would like to invoke the command compile but have it run interactively, just as if I had done Meta-x compile. Just invoking (compile) doesn't work as it expects arguments. So how do force emacs to run compile "interactively"?

Upvotes: 3

Views: 209

Answers (1)

Dov Grobgeld
Dov Grobgeld

Reputation: 4983

The answer is:

(call-interactively 'compile)

This does exactly what I asked for in the question.

Upvotes: 2

Related Questions