mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Make called-interactively-p work for edebug or advised code.
* lisp/subr.el (called-interactively-p-functions): New var. (internal--called-interactively-p--get-frame): New macro. (called-interactively-p, interactive-p): Rewrite in Lisp. * lisp/emacs-lisp/nadvice.el (advice--called-interactively-skip): New fun. (called-interactively-p-functions): Use it. * lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): New fun. (called-interactively-p-functions): Use it. * lisp/allout.el (allout-called-interactively-p): Don't assume called-interactively-p is a subr. * src/eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove. (syms_of_eval): Remove corresponding defsubr. * src/bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function. * test/automated/advice-tests.el (advice-tests--data): Remove. (advice-tests): Move the tests directly here instead. Add called-interactively-p tests.
This commit is contained in:
parent
b0636be7f9
commit
23ba2705e2
10 changed files with 336 additions and 186 deletions
|
|
@ -1657,10 +1657,9 @@ and the place for the cursor after the decryption is done."
|
|||
(defmacro allout-called-interactively-p ()
|
||||
"A version of `called-interactively-p' independent of Emacs version."
|
||||
;; ... to ease maintenance of allout without betraying deprecation.
|
||||
(if (equal (subr-arity (symbol-function 'called-interactively-p))
|
||||
'(0 . 0))
|
||||
'(called-interactively-p)
|
||||
'(called-interactively-p 'interactive)))
|
||||
(if (ignore-errors (called-interactively-p 'interactive) t)
|
||||
'(called-interactively-p 'interactive)
|
||||
'(called-interactively-p)))
|
||||
;;;_ = allout-inhibit-aberrance-doublecheck nil
|
||||
;; In some exceptional moments, disparate topic depths need to be allowed
|
||||
;; momentarily, eg when one topic is being yanked into another and they're
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue