nicferrier / emacs-noflet

noflet - nic's overriding flet, for fleting functions for the purpose of decorating them
72 stars 17 forks source link

Bind commands? #16

Open vspinu opened 9 years ago

vspinu commented 9 years ago

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

(noflet ((test1 () (interactive) (insert "test1")))
  (call-interactively 'test1))
DarwinAwardWinner commented 9 years ago

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

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

DarwinAwardWinner commented 9 years ago

Ok, now it's a pull request.

vspinu commented 9 years ago

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

DarwinAwardWinner commented 9 years ago

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