From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#3984: Date: Fri, 20 Sep 2013 10:35:01 -0400 Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> <523BCDBB.3000202@thompsonclan.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1379687838 25858 80.91.229.3 (20 Sep 2013 14:37:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Sep 2013 14:37:18 +0000 (UTC) Cc: 3984@debbugs.gnu.org To: Ryan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 20 16:37:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VN1pf-0005Wz-JG for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Sep 2013 16:37:19 +0200 Original-Received: from localhost ([::1]:56151 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN1pf-0007kk-7x for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Sep 2013 10:37:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN1pV-0007kF-IN for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2013 10:37:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VN1pO-00065k-91 for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2013 10:37:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN1pO-00065N-4M for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2013 10:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VN1pN-0006eq-Mu for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2013 10:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 14:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137968781025575 (code B ref 3984); Fri, 20 Sep 2013 14:37:01 +0000 Original-Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 14:36:50 +0000 Original-Received: from localhost ([127.0.0.1]:51242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN1pB-0006eQ-Kz for submit@debbugs.gnu.org; Fri, 20 Sep 2013 10:36:50 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:36651) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN1p8-0006eF-TO for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 10:36:47 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r8KEai6W026786; Fri, 20 Sep 2013 10:36:45 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id F218D62D6C; Fri, 20 Sep 2013 10:35:01 -0400 (EDT) In-Reply-To: <523BCDBB.3000202@thompsonclan.org> (Ryan's message of "Thu, 19 Sep 2013 21:23:23 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4707=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4707> : inlines <96> : streams <1041465> : uri <1542515> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78608 Archived-At: > After a little more consideration, I think I know what the bug is. The goal > of "advice--called-interactively-skip" is to skip all the advice-related > stack frames of the called function, not advice-related stack frames for > advice on call-interactively. Oh, right. How 'bout the patch below? Stefan === modified file 'lisp/subr.el' --- lisp/subr.el 2013-09-18 03:50:18 +0000 +++ lisp/subr.el 2013-09-20 14:34:03 +0000 @@ -4246,6 +4246,8 @@ if those frames don't seem special and otherwise, it should return the number of frames to skip (minus 1).") +(defconst internal--call-interactively (symbol-function 'call-interactively)) + (defun called-interactively-p (&optional kind) "Return t if the containing function was called by `call-interactively'. If KIND is `interactive', then only return t if the call was made @@ -4321,7 +4323,9 @@ ;; Somehow, I sometimes got `command-execute' rather than ;; `call-interactively' on my stacktrace !? ;;(`(,_ . (t command-execute . ,_)) t) - (`(,_ . (t call-interactively . ,_)) t))))) + (`(,_ . (t ,(or `call-interactively + (pred (eq internal--call-interactively))) . ,_)) + t))))) (defun interactive-p () "Return t if the containing function was run directly by user input.