nicferrier/emacs-noflet

Bind commands?

Opened this issue · 4 comments

Is there a way to re-bind commands. Something like?

(noflet ((test1 () (interactive) (insert "test1")))
  (call-interactively 'test1))

So, I just implemented this: http://stackoverflow.com/a/29668310/125921

@nicferrier, do you have any interest in incorporating this into noflet?

Ok, now it's a pull request.

@DarwinAwardWinner thanks! Is it completely transparent to the user and one (interactive) inside a function would be enough?

Yep, it just works the way you expect it to. And it works on your example.