unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Defadvice use
@ 2005-04-18 12:56 Matthias
  2005-04-18 17:11 ` rgb
                   ` (2 more replies)
  0 siblings, 3 replies; 29+ messages in thread
From: Matthias @ 2005-04-18 12:56 UTC (permalink / raw)


Hi,

I have the following problem: How do I advice a function so that
within that function, the function `read-minibuffer' (for example)
calls the definition of another function, say `my-read-minibuffer'?

I'm trying to use an advice around the function; the advice providing
a binding of the symbol `read-minibuffer' to the definition of
`my-read-minibuffer'. Like the following:

(defadvice la-fonction
  (around la-fonction-extended enable compile)
  "Documentation"
   (let (f1)
     (fset 'f1 read-minibuffer)
     (fset 'read-minibuffer my-read-minibuffer)
     ad-do-it
     (fset 'read-minibuffer f1)))

Any comment? Is it silly? Is there a better way? Any idea?

Thanks for your help,
-- 
Matthias

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

end of thread, other threads:[~2005-04-20 14:41 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 12:56 Defadvice use Matthias
2005-04-18 17:11 ` rgb
2005-04-18 17:25   ` Johan Bockgård
2005-04-18 19:05     ` rgb
2005-04-18 19:43       ` Stefan Monnier
2005-04-19  0:15         ` rgb
2005-04-19  0:28           ` Stefan Monnier
2005-04-19  3:48             ` Mis-features of let (was Defadvice use) rgb
2005-04-19  4:31               ` Mis-features of let Stefan Monnier
2005-04-19  6:38                 ` rgb
2005-04-19 12:21                   ` Stefan Monnier
2005-04-19 20:31                     ` rgb
2005-04-19 21:45                       ` David Kastrup
2005-04-19 12:55                   ` Barry Margolin
2005-04-19 20:31                     ` rgb
2005-04-20  4:12                       ` Barry Margolin
2005-04-19 21:10                     ` rgb
2005-04-19 21:57                       ` Kevin Rodgers
2005-04-19 22:00                       ` David Kastrup
2005-04-20  1:04                         ` rgb
2005-04-20 10:04                           ` David Kastrup
2005-04-20 11:57                             ` Stefan Monnier
2005-04-20 14:41                           ` Thien-Thi Nguyen
2005-04-19  9:41               ` Thien-Thi Nguyen
2005-04-19  5:07           ` Defadvice use Barry Margolin
2005-04-18 17:52 ` Stefan Monnier
2005-04-18 21:07   ` Matthias
2005-04-18 23:20     ` Stefan Monnier
2005-04-18 20:28 ` Kevin Rodgers

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).