From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Brittleness of called-interactively-p Date: Mon, 13 Jul 2015 19:03:37 -0400 Message-ID: References: <871tgeufzt.fsf@gmail.com> <874ml8t7cr.fsf@gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: plane.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: ger.gmane.org 1436829383 29040 80.91.229.3 (13 Jul 2015 23:16:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2015 23:16:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitri Paduchikh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 14 01:16:12 2015 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 1ZEmxF-0004Ly-Ic for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2015 01:16:09 +0200 Original-Received: from localhost ([::1]:57113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEmxE-0007nR-I8 for ged-emacs-devel@m.gmane.org; Mon, 13 Jul 2015 19:16:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEmwO-0007XL-0D for emacs-devel@gnu.org; Mon, 13 Jul 2015 19:15:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEmwI-0002Dw-40 for emacs-devel@gnu.org; Mon, 13 Jul 2015 19:15:15 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEmwB-0001ga-E7; Mon, 13 Jul 2015 19:15:03 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZEml7-00047D-90; Mon, 13 Jul 2015 19:03:37 -0400 In-reply-to: <874ml8t7cr.fsf@gmail.com> (message from Dmitri Paduchikh on Mon, 13 Jul 2015 20:17:24 +0500) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:187862 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > If I understand right, an instrumenting code must be aware of the variable > name used internally by a function. That is, when writing defadvice I should > look inside foo in order to figure out that internally it's using in-foo, Yes. However, there needs to be a way to find that out in order for calls to the function to bind that variable. If we provide a convenient function to get that variable name, perhaps called called-interactively-binding-variable, it will be easy for advising and other instrumenters to do what is needed. Advising has to do SOMETHING about this, because if the advice makes a wrapper, and it is necessary for that wrapper to bind the variable (or whatever is used) _instead_ of the original function. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html.