From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: flet + advised functions
Date: Tue, 08 Mar 2011 07:47:57 +0100 [thread overview]
Message-ID: <87sjuyhzvm.fsf@fh-trier.de> (raw)
I just discovered that `flet' does not work with (some form of)
advised functions, such that it doesn't restore the original
function. I have found no references to this behaviour on the
net, no bug reports either. The results are the same in
emacs22/24. I assume, it has been this way for a long time !?
(progn
(unintern 'foo)
(defun foo () 'defun)
(defadvice foo (around foo activate)
ad-do-it)
(setq letf-save (symbol-function
;;'ad-Orig-foo
'foo
))
(fset 'foo (lambda nil 'flet))
(fset 'foo letf-save)
(foo))
=> flet
-ap
next reply other threads:[~2011-03-08 6:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-08 6:47 Andreas Politz [this message]
2011-03-08 19:38 ` flet + advised functions PJ Weisberg
[not found] ` <mailman.18.1299613165.4046.help-gnu-emacs@gnu.org>
2011-03-08 20:35 ` Andreas Politz
2011-03-08 20:49 ` PJ Weisberg
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sjuyhzvm.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.