From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Can ad-do-it be used in a function called from the defadvice code? Date: Wed, 1 Jul 2009 18:09:04 +0200 Message-ID: References: <55477.130.55.118.19.1246464163.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1246465011 9937 80.91.229.12 (1 Jul 2009 16:16:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Jul 2009 16:16:51 +0000 (UTC) Cc: Emacs-Devel devel To: herring@lanl.gov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 01 18:16:44 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MM2UE-0004at-45 for ged-emacs-devel@m.gmane.org; Wed, 01 Jul 2009 18:16:42 +0200 Original-Received: from localhost ([127.0.0.1]:32870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MM2UD-0006MT-EE for ged-emacs-devel@m.gmane.org; Wed, 01 Jul 2009 12:16:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MM2Mx-0006d5-65 for emacs-devel@gnu.org; Wed, 01 Jul 2009 12:09:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MM2Ms-0006Xd-DL for emacs-devel@gnu.org; Wed, 01 Jul 2009 12:09:10 -0400 Original-Received: from [199.232.76.173] (port=36950 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MM2Ms-0006XL-76 for emacs-devel@gnu.org; Wed, 01 Jul 2009 12:09:06 -0400 Original-Received: from mail-bw0-f225.google.com ([209.85.218.225]:51025) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MM2Mr-0007Tp-N6 for emacs-devel@gnu.org; Wed, 01 Jul 2009 12:09:05 -0400 Original-Received: by bwz25 with SMTP id 25so1029775bwz.42 for ; Wed, 01 Jul 2009 09:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qn5ojHC2MWLR13M085yGE0W3Ukiq6a6BzNEHC1nZkRo=; b=DTh/jaCA0X0+IeG8RQ9eLCt39RjEHkGmLTyTo15I3rLc79527rwkuLnk7Mr0Antx1H H9uRTAjHfgOYnjgYzYlPbNjy/1uYVlO9ZOv0fWpJ4kmbBtn8OmrJrWvmfG+6AsLSdHuT uP34bonCvcLVyE0vXo2aWivLta/Fj77RC7oGM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=u22CnKB6Ib1CG5YaShvERnRG2+nF8UXJ0DUwtWMuEiyO9Z6Hx0X+OG0jVQZjNkZzLJ 4YIuyD5VX9yR+usUAq4nLoACWV1Wx16a5G91BN0Pf0a++PHG7XL7Ju/vRlj+a0z9eysD c+0K/77rhDvvE86juFrbE4yo+fgYJEPCg6SSk= Original-Received: by 10.239.179.198 with SMTP id e6mr798443hbg.98.1246464544349; Wed, 01 Jul 2009 09:09:04 -0700 (PDT) In-Reply-To: <55477.130.55.118.19.1246464163.squirrel@webmail.lanl.gov> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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 Xref: news.gmane.org gmane.emacs.devel:111863 Archived-At: On Wed, Jul 1, 2009 at 6:02 PM, Davis Herring wrote: > Of course not. =C2=A0It's not a macro, since you don't call it like a fun= ction. > =C2=A0It can't be a variable, because that couldn't trigger evaluation of= the > advised function. =C2=A0So it must be something magical that defadvice it= self > looks for. =C2=A0It can't see into the functions you're calling -- not wi= thout > a truly ridiculous amount of instrumentation and overhead -- so it can't > make ad-do-it magic anywhere else. Thanks Davis, but maybe you are right that it is hard to implement, but on the other hand can't ad-do-it be left as a placeholder where the correct function is called when needed. It does not seem to be very much overhead to me since the let-binding structure is already there and probably can be used with some mangling. But anyway I beleive you are right about how it is implemented now (so I wll copy some code instead...)