From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Date: Thu, 30 Jul 2009 21:58:51 -0400 Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> Reply-To: Stefan Monnier , 3984@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249008425 19249 80.91.229.12 (31 Jul 2009 02:47:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2009 02:47:05 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, 3984@emacsbugs.donarmstrong.com To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 31 04:46:58 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MWi92-0006lU-8U for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 04:46:57 +0200 Original-Received: from localhost ([127.0.0.1]:34334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWi92-0006KB-1E for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jul 2009 22:46:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWi8x-0006K2-LT for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 22:46:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWi8t-0006Ji-2b for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 22:46:51 -0400 Original-Received: from [199.232.76.173] (port=51303 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWi8s-0006Jf-VF for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 22:46:46 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:36127) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWi8s-0004rq-8X for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 22:46:46 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6V2ki89030924; Thu, 30 Jul 2009 19:46:44 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6V2e69r030113; Thu, 30 Jul 2009 19:40:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 31 Jul 2009 02:40:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3984 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124900773629890 (code B ref -1); Fri, 31 Jul 2009 02:40:06 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 31 Jul 2009 02:35:36 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6V2ZO07029879 for ; Thu, 30 Jul 2009 19:35:31 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:45828 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MWhOZ-0002za-Ua for emacs-pretest-bug@gnu.org; Thu, 30 Jul 2009 21:58:56 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MWhOZ-0000lV-9O for emacs-pretest-bug@gnu.org; Thu, 30 Jul 2009 21:58:55 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:11755) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWhOY-0000ku-SQ for emacs-pretest-bug@gnu.org; Thu, 30 Jul 2009 21:58:55 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWhOY-00015k-6H for emacs-pretest-bug@gnu.org; Thu, 30 Jul 2009 21:58:54 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnsFAErscUpFpZgv/2dsb2JhbACBUtElhBcFhxo X-IronPort-AV: E=Sophos;i="4.43,299,1246852800"; d="scan'208";a="42598403" Original-Received: from 69-165-152-47.dsl.teksavvy.com (HELO pastel.home) ([69.165.152.47]) by ironport2-out.teksavvy.com with ESMTP; 30 Jul 2009 21:58:52 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 05135800B; Thu, 30 Jul 2009 21:58:52 -0400 (EDT) In-Reply-To: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> (Drew Adams's message of "Thu, 30 Jul 2009 15:37:50 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Detected-Operating-System: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 30 Jul 2009 22:46:51 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29749 gmane.emacs.pretest.bugs:24896 Archived-At: > Can someone please explain why this happens, or how to work around it? Because the implementation of interactive-p (and called-interactively-p) is brittle: it looks at the latest stack frames to see the name of the caller, so if you add things between the call to `call-interactively' and the corresponding function call, it gets confused. To work around it, don't use `interactive-p' and instead add an optional argument (call it `interactive') to your function and pass it an explicit non-nil value from the interactive spec. Stefan