changeset 20404:7cce7f974c78

(debug-on-entry): If definition is a symbol, replace it with an equivalent lambda.
author Karl Heuer <kwzh@gnu.org>
date Thu, 04 Dec 1997 04:46:09 +0000
parents 698119867c21
children faf18d58a01b
files lisp/emacs-lisp/debug.el
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/debug.el	Thu Dec 04 04:42:31 1997 +0000
+++ b/lisp/emacs-lisp/debug.el	Thu Dec 04 04:46:09 1997 +0000
@@ -457,6 +457,11 @@
 Redefining FUNCTION also cancels it."
   (interactive "aDebug on entry (to function): ")
   (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))
       (error "Function %s is a primitive" function))
   (or (consp (symbol-function function))