From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Combining flet and defadvice
Date: Fri, 21 May 2010 15:36:40 +0200 [thread overview]
Message-ID: <87eih58jh3.fsf@fh-trier.de> (raw)
In-Reply-To: 701f887c-e936-41da-aa7c-c337455d03f4@c11g2000vbe.googlegroups.com
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
next prev parent reply other threads:[~2010-05-21 13:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-15 14:58 Howto override a function only locally in elisp? LanX
2010-05-15 15:45 ` Andreas Politz
[not found] ` <701f887c-e936-41da-aa7c-c337455d03f4@c11g2000vbe.googlegroups.com>
2010-05-21 13:36 ` Andreas Politz [this message]
2010-05-21 13:59 ` Combining flet and defadvice LanX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eih58jh3.fsf@fh-trier.de \
--to=politza@fh-trier.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).