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: Tue, 01 Mar 2005 04:08:48 -0500

Index: emacs/lisp/emacs-lisp/debug.el
diff -c emacs/lisp/emacs-lisp/debug.el:1.68 emacs/lisp/emacs-lisp/debug.el:1.69
*** emacs/lisp/emacs-lisp/debug.el:1.68 Mon Feb 28 14:33:50 2005
--- emacs/lisp/emacs-lisp/debug.el      Tue Mar  1 09:08:47 2005
***************
*** 25,31 ****
  
  ;;; Commentary:
  
! ;; This is a major mode documented in the Emacs manual.
  
  ;;; Code:
  
--- 25,31 ----
  
  ;;; Commentary:
  
! ;; This is a major mode documented in the Emacs Lisp manual.
  
  ;;; Code:
  
***************
*** 479,486 ****
        (insert ? )))
    (beginning-of-line))
  
- 
- 
  (put 'debugger-env-macro 'lisp-indent-function 0)
  (defmacro debugger-env-macro (&rest body)
    "Run BODY in original environment."
--- 479,484 ----
***************
*** 694,700 ****
              (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.")
  
--- 692,697 ----
***************
*** 705,726 ****
        (debug-on-entry-1 function (cdr defn) flag)
        (or (eq (car defn) 'lambda)
          (error "%s not user-defined Lisp function" function))
!       (let ((tail (cddr defn)))
        ;; Skip the docstring.
!       (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))
!           (nconc defn tail))
          ;; Add/remove debug statement as needed.
!         (if (not flag)
!             (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 ()
--- 702,719 ----
        (debug-on-entry-1 function (cdr defn) flag)
        (or (eq (car defn) 'lambda)
          (error "%s not user-defined Lisp function" function))
!       (let ((tail (cdr defn)))
        ;; Skip the docstring.
!       (when (and (stringp (cadr tail)) (cddr tail))
!         (setq tail (cdr tail)))
        ;; Skip the interactive form.
!       (when (eq 'interactive (car-safe (cadr tail))) 
!         (setq tail (cdr tail)))
!       (unless (eq flag (equal (cadr tail) debug-entry-code))
          ;; Add/remove debug statement as needed.
!         (if flag
!             (setcdr tail (cons debug-entry-code (cdr tail)))
!           (setcdr tail (cddr tail))))
        defn))))
  
  (defun debugger-list-functions ()




reply via email to

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