93 |
(defvar debugger-outer-inhibit-redisplay) |
(defvar debugger-outer-inhibit-redisplay) |
94 |
(defvar debugger-outer-cursor-in-echo-area) |
(defvar debugger-outer-cursor-in-echo-area) |
95 |
|
|
96 |
|
(defvar inhibit-debug-on-entry nil) |
97 |
|
|
98 |
;;;###autoload |
;;;###autoload |
99 |
(setq debugger 'debug) |
(setq debugger 'debug) |
100 |
;;;###autoload |
;;;###autoload |
149 |
(setq overriding-terminal-local-map nil) |
(setq overriding-terminal-local-map nil) |
150 |
;; Don't let these magic variables affect the debugger itself. |
;; Don't let these magic variables affect the debugger itself. |
151 |
(let ((last-command nil) this-command track-mouse |
(let ((last-command nil) this-command track-mouse |
152 |
|
(inhibit-trace t) |
153 |
|
(inhibit-debug-on-entry t) |
154 |
unread-command-events |
unread-command-events |
155 |
unread-post-input-method-events |
unread-post-input-method-events |
156 |
last-input-event last-command-event last-nonmenu-event |
last-input-event last-command-event last-nonmenu-event |
193 |
(backtrace-debug 3 t)) |
(backtrace-debug 3 t)) |
194 |
(debugger-reenable) |
(debugger-reenable) |
195 |
(message "") |
(message "") |
196 |
(let ((inhibit-trace t) |
(let ((standard-output nil) |
|
(standard-output nil) |
|
197 |
(buffer-read-only t)) |
(buffer-read-only t)) |
198 |
(message "") |
(message "") |
199 |
;; Make sure we unbind buffer-read-only in the right buffer. |
;; Make sure we unbind buffer-read-only in the right buffer. |
694 |
(setq body (cons (documentation function) body))) |
(setq body (cons (documentation function) body))) |
695 |
(fset function (cons 'lambda (cons (car contents) body))))))) |
(fset function (cons 'lambda (cons (car contents) body))))))) |
696 |
|
|
697 |
|
|
698 |
|
(defconst debug-entry-code '(if inhibit-debug-on-entry nil (debug 'debug)) |
699 |
|
"Code added to a function to cause it to call the debugger upon entry.") |
700 |
|
|
701 |
(defun debug-on-entry-1 (function defn flag) |
(defun debug-on-entry-1 (function defn flag) |
702 |
(if (subrp defn) |
(if (subrp defn) |
703 |
(error "%s is a built-in function" function) |
(error "%s is a built-in function" function) |
710 |
(if (stringp (car tail)) (setq tail (cdr tail))) |
(if (stringp (car tail)) (setq tail (cdr tail))) |
711 |
;; Skip the interactive form. |
;; Skip the interactive form. |
712 |
(if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail))) |
(if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail))) |
713 |
(unless (eq flag (equal (car tail) '(debug 'debug))) |
(unless (eq flag (equal (car tail) debug-entry-code)) |
714 |
;; If the function has no body, add nil as a body element. |
;; If the function has no body, add nil as a body element. |
715 |
(when (null tail) |
(when (null tail) |
716 |
(setq tail (list nil)) |
(setq tail (list nil)) |
720 |
(progn (setcar tail (cadr tail)) |
(progn (setcar tail (cadr tail)) |
721 |
(setcdr tail (cddr tail))) |
(setcdr tail (cddr tail))) |
722 |
(setcdr tail (cons (car tail) (cdr tail))) |
(setcdr tail (cons (car tail) (cdr tail))) |
723 |
(setcar tail '(debug 'debug)))) |
(setcar tail debug-entry-code))) |
724 |
defn)))) |
defn)))) |
725 |
|
|
726 |
(defun debugger-list-functions () |
(defun debugger-list-functions () |