]> git.eshelyaron.com Git - emacs.git/commitdiff
called-interactively-p: cut broken comparison
authorMattias Engdegård <mattiase@acm.org>
Mon, 19 Dec 2022 16:42:33 +0000 (17:42 +0100)
committerMattias Engdegård <mattiase@acm.org>
Mon, 19 Dec 2022 16:42:33 +0000 (17:42 +0100)
* 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

index e142eaa81045ebc509ce162bbcec9ca94be58476..4fa63a1f3cd756f15e0fd151b30c619c161372fb 100644 (file)
@@ -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