(debug-on-entry): If definition is a symbol,
replace it with an equivalent lambda.
This commit is contained in:
parent
8c1cd093df
commit
f9e899b67e
1 changed files with 5 additions and 0 deletions
|
@ -457,6 +457,11 @@ Use \\[cancel-debug-on-entry] to cancel the effect of this command.
|
||||||
Redefining FUNCTION also cancels it."
|
Redefining FUNCTION also cancels it."
|
||||||
(interactive "aDebug on entry (to function): ")
|
(interactive "aDebug on entry (to function): ")
|
||||||
(debugger-reenable)
|
(debugger-reenable)
|
||||||
|
;; Handle a function that has been aliased to some other function.
|
||||||
|
(if (symbolp (symbol-function function))
|
||||||
|
(fset function `(lambda (&rest debug-on-entry-args)
|
||||||
|
(apply ',(symbol-function function)
|
||||||
|
debug-on-entry-args))))
|
||||||
(if (subrp (symbol-function function))
|
(if (subrp (symbol-function function))
|
||||||
(error "Function %s is a primitive" function))
|
(error "Function %s is a primitive" function))
|
||||||
(or (consp (symbol-function function))
|
(or (consp (symbol-function function))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue