subj.
Something like:
(lexical-let (oldf #'original-func)
(flet ((original-func (arg)
do-something
(funcall oldf arg)))
do-something))
don’t work 🙁
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hopefully this will help you with the syntax, calling swap-function calls foo1 but executes foo2.
You could write this as a useful macro with-replace-function which binds the old function with the new function while executing a body you pass in.