comparison lisp/emacs-lisp/debug.el @ 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 9bd868e76aa5
comparison
equal deleted inserted replaced
20403:698119867c21 20404:7cce7f974c78
455 which must be written in Lisp, not predefined. 455 which must be written in Lisp, not predefined.
456 Use \\[cancel-debug-on-entry] to cancel the effect of this command. 456 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))
463 (debug-convert-byte-code function)) 468 (debug-convert-byte-code function))
464 (or (consp (symbol-function function)) 469 (or (consp (symbol-function function))