/[emacs]/emacs/lisp/emacs-lisp/debug.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/debug.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.67 by rms, Sun Feb 27 09:57:51 2005 UTC revision 1.68 by monnier, Mon Feb 28 14:33:50 2005 UTC
# Line 93  This is to optimize `debugger-make-xrefs Line 93  This is to optimize `debugger-make-xrefs
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
# Line 147  first will be printed into the backtrace Line 149  first will be printed into the backtrace
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
# Line 189  first will be printed into the backtrace Line 193  first will be printed into the backtrace
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.
# Line 691  If argument is nil or an empty string, c Line 694  If argument is nil or an empty string, c
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)
# Line 703  If argument is nil or an empty string, c Line 710  If argument is nil or an empty string, c
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))
# Line 713  If argument is nil or an empty string, c Line 720  If argument is nil or an empty string, c
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 ()

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26