From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500) Date: Fri, 16 Nov 2012 13:11:58 -0500 Message-ID: References: <87haoyl4on.fsf@topper.koldfront.dk> <87625bw1jx.fsf@visionobjects.com> <87pq3fxmta.fsf@googlemail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1353089529 9037 80.91.229.3 (16 Nov 2012 18:12:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Nov 2012 18:12:09 +0000 (UTC) Cc: Katsumi Yamaoka , ivan.kanis@googlemail.com, asjo@koldfront.dk, emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 16 19:12:18 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TZQOn-00053O-NL for ged-emacs-devel@m.gmane.org; Fri, 16 Nov 2012 19:12:17 +0100 Original-Received: from localhost ([::1]:41247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZQOd-0003v3-NY for ged-emacs-devel@m.gmane.org; Fri, 16 Nov 2012 13:12:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZQOY-0003uh-Ky for emacs-devel@gnu.org; Fri, 16 Nov 2012 13:12:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZQOV-0003XU-IM for emacs-devel@gnu.org; Fri, 16 Nov 2012 13:12:02 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:53832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZQOV-0003XO-EO for emacs-devel@gnu.org; Fri, 16 Nov 2012 13:11:59 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09sr+ZY/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCwsOJhIUGA0kiBwFugmLCIU8A4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="207793943" Original-Received: from 108-175-230-88.dsl.teksavvy.com (HELO pastel.home) ([108.175.230.88]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 16 Nov 2012 13:11:58 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 36F3F59346; Fri, 16 Nov 2012 13:11:58 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Fri, 16 Nov 2012 12:25:15 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154885 Archived-At: > My current code can handle uses of called-interactively-p in > after/before advice but not in around advice. Problem is: all advices > defined with `defadvice' are implemented as (advice-add foo :around ...) > and indeed your "before" advice cannot be implemented as a (advice-add > foo :before ...) because it modifies arguments. Sorry, I was confused. My code can handle your example just fine. The problem comes when an around advice is added after your advice, at which point your advice won't work any more (not because your is an around advice, but because it's "hidden" by another around advice). So a :filter-args thingy wouldn't make any difference in this respect. Stefan