emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/debug.el


From: Lute Kamstra
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/debug.el
Date: Thu, 03 Mar 2005 11:25:13 -0500

Index: emacs/lisp/emacs-lisp/debug.el
diff -c emacs/lisp/emacs-lisp/debug.el:1.70 emacs/lisp/emacs-lisp/debug.el:1.71
*** emacs/lisp/emacs-lisp/debug.el:1.70 Tue Mar  1 13:00:30 2005
--- emacs/lisp/emacs-lisp/debug.el      Thu Mar  3 16:25:13 2005
***************
*** 93,103 ****
  (defvar debugger-outer-inhibit-redisplay)
  (defvar debugger-outer-cursor-in-echo-area)
  
! (defvar inhibit-debug-on-entry nil)
  
  ;; When you change this, you may also need to change the number of
  ;; frames that the debugger skips.
! (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.")
  
  ;;;###autoload
--- 93,111 ----
  (defvar debugger-outer-inhibit-redisplay)
  (defvar debugger-outer-cursor-in-echo-area)
  
! (defvar inhibit-debug-on-entry nil
!   "Non-nil means that debug-on-entry is disabled.")
! 
! (defvar debugger-jumping-flag nil
!   "Non-nil means that debug-on-entry is disabled.
! This variable is used by `debugger-jump' and `debugger-reenable'.")
  
  ;; When you change this, you may also need to change the number of
  ;; frames that the debugger skips.
! (defconst debug-entry-code
!   '(if (or inhibit-debug-on-entry debugger-jumping-flag)
!        nil
!      (debug 'debug))
    "Code added to a function to cause it to call the debugger upon entry.")
  
  ;;;###autoload
***************
*** 197,203 ****
                    ;; Skip the frames for backtrace-debug, byte-code,
                    ;; and debug-entry-code.
                    (backtrace-debug 4 t))
-               (debugger-reenable)
                (message "")
                (let ((standard-output nil)
                      (buffer-read-only t))
--- 205,210 ----
***************
*** 406,430 ****
    "Continue to exit from this frame, with all debug-on-entry suspended."
    (interactive)
    (debugger-frame)
!   ;; Turn off all debug-on-entry functions
!   ;; but leave them in the list.
!   (let ((list debug-function-list))
!     (while list
!       (fset (car list)
!           (debug-on-entry-1 (car list) (symbol-function (car list)) nil))
!       (setq list (cdr list))))
    (message "Continuing through this frame")
    (exit-recursive-edit))
  
  (defun debugger-reenable ()
!   "Turn all debug-on-entry functions back on."
!   (let ((list debug-function-list))
!     (while list
!       (or (consp (symbol-function (car list)))
!         (debug-convert-byte-code (car list)))
!       (fset (car list)
!           (debug-on-entry-1 (car list) (symbol-function (car list)) t))
!       (setq list (cdr list)))))
  
  (defun debugger-frame-number ()
    "Return number of frames in backtrace before the one point points at."
--- 413,429 ----
    "Continue to exit from this frame, with all debug-on-entry suspended."
    (interactive)
    (debugger-frame)
!   (setq debugger-jumping-flag t)
!   (add-hook 'post-command-hook 'debugger-reenable)
    (message "Continuing through this frame")
    (exit-recursive-edit))
  
  (defun debugger-reenable ()
!   "Turn all debug-on-entry functions back on.
! This function is put on `post-command-hook' by `debugger-jump' and
! removes itself from that hook."
!   (setq debugger-jumping-flag nil)
!   (remove-hook 'post-command-hook 'debugger-reenable))
  
  (defun debugger-frame-number ()
    "Return number of frames in backtrace before the one point points at."
***************
*** 634,640 ****
  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 (and (subrp (symbol-function function))
           (eq (cdr (subr-arity (symbol-function function))) 'unevalled))
--- 633,638 ----
***************
*** 665,671 ****
                                 (mapcar 'symbol-name debug-function-list)
                                 nil t nil)))
           (if name (intern name)))))
-   (debugger-reenable)
    (if (and function (not (string= function "")))
        (progn
        (let ((f (debug-on-entry-1 function (symbol-function function) nil)))
--- 663,668 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]