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: Problems with advice... Date: Thu, 17 Mar 2005 11:00:04 +0100 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111054570 13454 80.91.229.2 (17 Mar 2005 10:16:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2005 10:16:10 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 17 11:16:09 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DBs2k-0002Zh-1i for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2005 11:15:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBsIy-00068E-JY for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2005 05:32:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DBs6y-0004cg-2m for emacs-devel@gnu.org; Thu, 17 Mar 2005 05:20:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DBs6w-0004bV-9x for emacs-devel@gnu.org; Thu, 17 Mar 2005 05:20:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBs6w-0004bR-3s for emacs-devel@gnu.org; Thu, 17 Mar 2005 05:20:14 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DBrnX-0006CY-5B for emacs-devel@gnu.org; Thu, 17 Mar 2005 05:00:11 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1DBrnW-0007f6-NQ for emacs-devel@gnu.org; Thu, 17 Mar 2005 05:00:11 -0500 Original-To: emacs-devel@gnu.org 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:34658 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34658 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