[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3984:
From: |
Stefan Monnier |
Subject: |
bug#3984: |
Date: |
Fri, 20 Sep 2013 10:35:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> 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.
- bug#3984:, (continued)
- bug#3984:, Stefan Monnier, 2013/09/17
- bug#3984:, Ryan, 2013/09/18
- bug#3984:, Ryan, 2013/09/18
- bug#3984:, Stefan Monnier, 2013/09/18
- bug#3984:, Ryan, 2013/09/19
- bug#3984:, Ryan, 2013/09/19
- bug#3984:, Ryan, 2013/09/19
- bug#3984:, Ryan, 2013/09/20
- bug#3984: Fix case where call-interactively is advised, Ryan, 2013/09/20
- bug#3984:, Ryan, 2013/09/20
- bug#3984:,
Stefan Monnier <=
- bug#3984:, Ryan, 2013/09/20
- bug#3984:, Ryan, 2013/09/20
- bug#3984:, Stefan Monnier, 2013/09/20
- bug#3984:, Ryan, 2013/09/20
- bug#3984:, Stefan Monnier, 2013/09/20
- bug#3984:, Stefan Monnier, 2013/09/24