unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Temporary changing the behavior of a function
@ 2015-11-06 10:23 Marcin Borkowski
  2015-11-06 13:03 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marcin Borkowski @ 2015-11-06 10:23 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-06 18:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 10:23 Temporary changing the behavior of a function Marcin Borkowski
2015-11-06 13:03 ` Stefan Monnier
2015-11-06 16:06   ` Marcin Borkowski
2015-11-06 15:01 ` Yuri Khan
2015-11-06 16:05   ` Marcin Borkowski
2015-11-06 18:06 ` Michael Heerdegen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).