help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Defadvice use


From: Matthias
Subject: Defadvice use
Date: 18 Apr 2005 14:56:16 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]