[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Temporary changing the behavior of a function
From: |
Marcin Borkowski |
Subject: |
Temporary changing the behavior of a function |
Date: |
Fri, 06 Nov 2015 11:23:26 +0100 |
User-agent: |
mu4e 0.9.15; emacs 25.0.50.1 |
Hi list,
so there is this function `foo', which calls the function `bar'. The
function `bar' is responsible for asking the user for some value and
passing that value to the guts of `foo'.
Now I want to call `foo' in the Mafia-mode;-), i.e., it should ask no
further questions. What do I do? AFAIU, `cl-flet' won't help, since it
is lexical. The best I can think of is to temporarily advice `bar' with
:override - but then, instead of a `let'-like, local construct, I have
to explicitly add and then remove the advice, right?
Any other ideas?
TIA,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
- Temporary changing the behavior of a function,
Marcin Borkowski <=