[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/debug.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/debug.el |
Date: |
Mon, 28 Feb 2005 09:33:50 -0500 |
Index: emacs/lisp/emacs-lisp/debug.el
diff -c emacs/lisp/emacs-lisp/debug.el:1.67 emacs/lisp/emacs-lisp/debug.el:1.68
*** emacs/lisp/emacs-lisp/debug.el:1.67 Sun Feb 27 09:57:51 2005
--- emacs/lisp/emacs-lisp/debug.el Mon Feb 28 14:33:50 2005
***************
*** 93,98 ****
--- 93,100 ----
(defvar debugger-outer-inhibit-redisplay)
(defvar debugger-outer-cursor-in-echo-area)
+ (defvar inhibit-debug-on-entry nil)
+
;;;###autoload
(setq debugger 'debug)
;;;###autoload
***************
*** 147,152 ****
--- 149,156 ----
(setq overriding-terminal-local-map nil)
;; Don't let these magic variables affect the debugger itself.
(let ((last-command nil) this-command track-mouse
+ (inhibit-trace t)
+ (inhibit-debug-on-entry t)
unread-command-events
unread-post-input-method-events
last-input-event last-command-event last-nonmenu-event
***************
*** 189,196 ****
(backtrace-debug 3 t))
(debugger-reenable)
(message "")
! (let ((inhibit-trace t)
! (standard-output nil)
(buffer-read-only t))
(message "")
;; Make sure we unbind buffer-read-only in the right buffer.
--- 193,199 ----
(backtrace-debug 3 t))
(debugger-reenable)
(message "")
! (let ((standard-output nil)
(buffer-read-only t))
(message "")
;; Make sure we unbind buffer-read-only in the right buffer.
***************
*** 691,696 ****
--- 694,703 ----
(setq body (cons (documentation function) body)))
(fset function (cons 'lambda (cons (car contents) body)))))))
+
+ (defconst debug-entry-code '(if inhibit-debug-on-entry nil (debug 'debug))
+ "Code added to a function to cause it to call the debugger upon entry.")
+
(defun debug-on-entry-1 (function defn flag)
(if (subrp defn)
(error "%s is a built-in function" function)
***************
*** 703,709 ****
(if (stringp (car tail)) (setq tail (cdr tail)))
;; Skip the interactive form.
(if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail)))
! (unless (eq flag (equal (car tail) '(debug 'debug)))
;; If the function has no body, add nil as a body element.
(when (null tail)
(setq tail (list nil))
--- 710,716 ----
(if (stringp (car tail)) (setq tail (cdr tail)))
;; Skip the interactive form.
(if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail)))
! (unless (eq flag (equal (car tail) debug-entry-code))
;; If the function has no body, add nil as a body element.
(when (null tail)
(setq tail (list nil))
***************
*** 713,719 ****
(progn (setcar tail (cadr tail))
(setcdr tail (cddr tail)))
(setcdr tail (cons (car tail) (cdr tail)))
! (setcar tail '(debug 'debug))))
defn))))
(defun debugger-list-functions ()
--- 720,726 ----
(progn (setcar tail (cadr tail))
(setcdr tail (cddr tail)))
(setcdr tail (cons (car tail) (cdr tail)))
! (setcar tail debug-entry-code)))
defn))))
(defun debugger-list-functions ()