One of the very useful things I learned from Xah Lee’s Emacs tutorials is that almost any code can be attached to the Emacs Interactive
declaration. The only rule is that the code must return a list of values for the parameters of the function that includes the Interactive
declaration.
Marcin Borkowski, mbork, demonstrates this idea with a solution to this problem:
How can we implement an Interactive declaration for a function of two parameters where the prompt for the second parameter includes the value of the first parameter?
Take a look at Borkowski’s post to get an idea of the power of this idea. Most of us just use the standard interpretive format-like string input to Interactive
but there’s a lot more power available to those who know how to use it.