[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 03e75b0f5f: called-interactively-p: cut broken comparison
From: |
Mattias Engdegård |
Subject: |
master 03e75b0f5f: called-interactively-p: cut broken comparison |
Date: |
Mon, 19 Dec 2022 12:06:02 -0500 (EST) |
branch: master
commit 03e75b0f5f279f166db895ba4245bda6fa2f1ffe
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
called-interactively-p: cut broken comparison
* lisp/subr.el (called-interactively-p): Remove attempt to detect
`byte-code` frames; it wasn't done right but also does not seem
to be necessary. Adjust comment that was out of date.
---
lisp/subr.el | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index e142eaa810..4fa63a1f3c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -6084,14 +6084,8 @@ command is called from a keyboard macro?"
;; Skip special forms (from non-compiled code).
(and frame (null (car frame)))
;; Skip also `interactive-p' (because we don't want to know if
- ;; interactive-p was called interactively but if it's caller was)
- ;; and `byte-code' (idem; this appears in subexpressions of things
- ;; like condition-case, which are wrapped in a separate bytecode
- ;; chunk).
- ;; FIXME: For lexical-binding code, this is much worse,
- ;; because the frames look like "byte-code -> funcall -> #[...]",
- ;; which is not a reliable signature.
- (memq (nth 1 frame) '(interactive-p 'byte-code))
+ ;; interactive-p was called interactively but if it's caller was).
+ (eq (nth 1 frame) 'interactive-p)
;; Skip package-specific stack-frames.
(let ((skip (run-hook-with-args-until-success
'called-interactively-p-functions
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 03e75b0f5f: called-interactively-p: cut broken comparison,
Mattias Engdegård <=