diff options
| -rw-r--r-- | lisp/emacs-lisp/debug.el | 5 |
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. | |||
| 457 | Redefining FUNCTION also cancels it." | 457 | Redefining 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)) |