]> git.eshelyaron.com Git - emacs.git/commitdiff
(debug-on-entry): If definition is a symbol,
authorKarl Heuer <kwzh@gnu.org>
Thu, 4 Dec 1997 04:46:09 +0000 (04:46 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 4 Dec 1997 04:46:09 +0000 (04:46 +0000)
replace it with an equivalent lambda.

lisp/emacs-lisp/debug.el

index f7b8e31b714df70d49e4bb6bdb957a05237328c7..d4c79ea2534a2a9b6b0bca5bb961dd9821b873a9 100644 (file)
@@ -457,6 +457,11 @@ Use \\[cancel-debug-on-entry] to cancel the effect of this command.
 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))