From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka 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 08:01:29 +0900 Organization: Emacsen advocacy group 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; charset=us-ascii X-Trace: ger.gmane.org 1353020504 28392 80.91.229.3 (15 Nov 2012 23:01:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2012 23:01:44 +0000 (UTC) Cc: lekktu@gmail.com, asjo@koldfront.dk, ivan.kanis@googlemail.com, emacs-devel@gnu.org To: monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 16 00:01:54 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 1TZ8RV-0000nR-AQ for ged-emacs-devel@m.gmane.org; Fri, 16 Nov 2012 00:01:53 +0100 Original-Received: from localhost ([::1]:38495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZ8RL-0008Gk-G0 for ged-emacs-devel@m.gmane.org; Thu, 15 Nov 2012 18:01:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:57376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZ8RG-0008GR-Vv for emacs-devel@gnu.org; Thu, 15 Nov 2012 18:01:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZ8RD-0008SJ-Ta for emacs-devel@gnu.org; Thu, 15 Nov 2012 18:01:38 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]:49695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZ8RD-0008SD-Pa for emacs-devel@gnu.org; Thu, 15 Nov 2012 18:01:35 -0500 Original-Received: from localhost ([127.0.0.1]:36937) by orlando.hostforweb.net with smtp (Exim 4.77) (envelope-from ) id 1TZ8RB-0004H4-JD; Thu, 15 Nov 2012 17:01:33 -0600 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.130006 (=?iso-2022-jp?B?GyRCPz8bKEI=?= Gnus v0.6) Emacs/24.3.50 (i686-pc-cygwin) Cancel-Lock: sha1:Y732AF+KaoLjawgk8nfR2Ytfsr0= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (barebone) [generic] X-Received-From: 216.246.45.90 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:154874 Archived-At: >> Unfortunately called-interactively-p never returns non-nil while >> performing an advised command interactively. > Yes, called-interactively-p (and interactivep, of course) are pretty > sensitive beasts. The problem you mention was already present before, > tho it probably got a bit worse (it used to "only" affect uses of > called-interactively-p in the advised command, whereas it now also > affects uses in the advice themselves). Ok. It seems hard to me to fix, so I will live with this way (for a while?). (defvar my-called-interactively-p nil) (defadvice called-interactively-p (around work-for-advised-commands activate) "Work for advised commands." (or my-called-interactively-p ad-do-it)) (defadvice interactive-p (around work-for-advised-commands activate) "Work for advised commands." (or my-called-interactively-p ad-do-it)) (defadvice command (around work-interactively (arg &optional arg EXTRA-ARG) activate) "Work interactively." (interactive (list bla bla t)) (let ((my-called-interactively-p EXTRA-ARG)) ad-do-it))