[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Combining flet and defadvice
From: |
Andreas Politz |
Subject: |
Re: Combining flet and defadvice |
Date: |
Wed, 08 Dec 2010 15:09:24 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
LanX <lanx.perl@googlemail.com> writes:
>
> Now I was trying to use this flet approach in combination with
> defadvice around, but it didn't work ...
>
> ------------------------
> (require 'pos-tip)
> (require 'cl)
>
> (add-hook 'cperl-mode-hook
> (lambda ()
> (cperl-toggle-autohelp)
> (setq cperl-lazy-help-time 2)
>
>
> (defadvice cperl-describe-perl-symbol (around cperl-describe-perl-
> symbol-tooltip)
> "redirect message to tooltip"
> (flet ((message (fmt &rest args)
> (pos-tip-show (apply 'format fmt args))))
> ad-do-it))
> ))
> ----------
>
> What am I missing?
You have to somehow activate the advice....
(defadvice cperl-describe-perl-symbol (around ad-name activate)
....)
-ap