unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Howto override a function only locally in elisp?
@ 2010-05-15 14:58 LanX
  2010-05-15 15:45 ` Andreas Politz
  0 siblings, 1 reply; 4+ messages in thread
From: LanX @ 2010-05-15 14:58 UTC (permalink / raw)
  To: help-gnu-emacs

Hi

what's the best approach to replace a function only for another
function?

My use case is to replace calls to `message' with `tooltip-show'
within some function in certain programming modes.

But I don't want to copy and change the whole function, it would be
sufficient to override locally any call to `message' with a `my-
message' function without globally messing up message.

Any idea? Perhaps with `defadvice'?

Cheers
  Rolf





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

end of thread, other threads:[~2010-05-21 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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     ` Combining flet and defadvice Andreas Politz
2010-05-21 13:59       ` LanX

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