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

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

flet + advised functions


From: Andreas Politz
Subject: flet + advised functions
Date: Tue, 08 Mar 2011 07:47:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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


reply via email to

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