aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorKarl Heuer1997-12-04 04:46:09 +0000
committerKarl Heuer1997-12-04 04:46:09 +0000
commitf9e899b67eb75bbc93dec779594ac13bc1b0733c (patch)
treed662a90732939ca7cb1d9eafc6811612cd5f8d36 /lisp/emacs-lisp
parent8c1cd093df5cfa60b3941f869bae60e94936e1d7 (diff)
downloademacs-f9e899b67eb75bbc93dec779594ac13bc1b0733c.tar.gz
emacs-f9e899b67eb75bbc93dec779594ac13bc1b0733c.zip
(debug-on-entry): If definition is a symbol,
replace it with an equivalent lambda.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/debug.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index f7b8e31b714..d4c79ea2534 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -457,6 +457,11 @@ Use \\[cancel-debug-on-entry] to cancel the effect of this command.
457Redefining FUNCTION also cancels it." 457Redefining FUNCTION also cancels it."
458 (interactive "aDebug on entry (to function): ") 458 (interactive "aDebug on entry (to function): ")
459 (debugger-reenable) 459 (debugger-reenable)
460 ;; Handle a function that has been aliased to some other function.
461 (if (symbolp (symbol-function function))
462 (fset function `(lambda (&rest debug-on-entry-args)
463 (apply ',(symbol-function function)
464 debug-on-entry-args))))
460 (if (subrp (symbol-function function)) 465 (if (subrp (symbol-function function))
461 (error "Function %s is a primitive" function)) 466 (error "Function %s is a primitive" function))
462 (or (consp (symbol-function function)) 467 (or (consp (symbol-function function))