emacs-devel
[Top][All Lists]
Advanced

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

Problems with advice...


From: David Kastrup
Subject: Problems with advice...
Date: Thu, 17 Mar 2005 11:00:04 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

I have the problem that preactivated advice no longer gets
preactivated.  However, the same problem occurs now with a current
compilation of Emacs-21.3!  So I suspect that it might be
compiler-related (gcc-4.0).  It worked at one point of time in the
past.

Whatever.  In the search for the problem I have also come across the
following code snippet in advice.el:

                    ((and orig-subr-p
                          orig-interactive-p
                          (not interactive-form)
                          (not advised-interactive-form))
                     ;; Check whether we were called interactively
                     ;; in order to do proper prompting:
                     `(if (called-interactively-p)
                          (call-interactively ',origname)
                        ,(ad-make-mapped-call orig-arglist
                                              advised-arglist
                                              origname)))
                    ;; And now for normal functions and non-interactive subrs
                    ;; (or subrs whose interactive behavior was advised):
                    (t (ad-make-mapped-call
                        advised-arglist orig-arglist origname)))))

This looks so wrong that I want somebody with more of a clue to take a
look at it: ad-make-mapped-call is called in two branches of a cond,
and the order of its first two arguments is interchanged in those two
calls!

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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