From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Problems with advice... Date: Thu, 17 Mar 2005 11:41:42 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111059221 28075 80.91.229.2 (17 Mar 2005 11:33:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2005 11:33:41 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 17 12:33:41 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DBtFx-0002sf-GQ for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2005 12:33:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBtWE-0007YC-6t for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2005 06:50:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DBskJ-0004aJ-DC for emacs-devel@gnu.org; Thu, 17 Mar 2005 06:00:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DBskC-0004Zh-Vs for emacs-devel@gnu.org; Thu, 17 Mar 2005 06:00:52 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBsgf-00043U-RC for emacs-devel@gnu.org; Thu, 17 Mar 2005 05:57:10 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DBsRo-0001O0-N3 for emacs-devel@gnu.org; Thu, 17 Mar 2005 05:41:48 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1DBsRo-0000uR-7E for emacs-devel@gnu.org; Thu, 17 Mar 2005 05:41:48 -0500 Original-To: emacs-devel@gnu.org In-Reply-To: (David Kastrup's message of "Thu, 17 Mar 2005 11:00:04 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34660 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34660 David Kastrup writes: > 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. Update on that: seemingly related to loading a completely unrelated package (that does a "require" on the file containing the function to be advised), so not a compiler error after all. I have to debug this further. In the mean time, the following finding still looks bad: > 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