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: Luc Teirlinck
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/debug.el
Date: Sat, 11 Jun 2005 19:52:51 -0400

Index: emacs/lisp/emacs-lisp/debug.el
diff -c emacs/lisp/emacs-lisp/debug.el:1.83 emacs/lisp/emacs-lisp/debug.el:1.84
*** emacs/lisp/emacs-lisp/debug.el:1.83 Thu Jun  9 03:09:30 2005
--- emacs/lisp/emacs-lisp/debug.el      Sat Jun 11 23:52:51 2005
***************
*** 614,620 ****
      (terpri))
  
    (with-current-buffer (get-buffer debugger-record-buffer)
!     (message "%s" 
             (buffer-substring (line-beginning-position 0)
                               (line-end-position 0)))))
  
--- 614,620 ----
      (terpri))
  
    (with-current-buffer (get-buffer debugger-record-buffer)
!     (message "%s"
             (buffer-substring (line-beginning-position 0)
                               (line-end-position 0)))))
  
***************
*** 656,677 ****
  ;;;###autoload
  (defun debug-on-entry (function)
    "Request FUNCTION to invoke debugger each time it is called.
  If you tell the debugger to continue, FUNCTION's execution proceeds.
  This works by modifying the definition of FUNCTION,
  which must be written in Lisp, not predefined.
  Use \\[cancel-debug-on-entry] to cancel the effect of this command.
  Redefining FUNCTION also cancels it."
    (interactive "aDebug on entry (to function): ")
!   (when (and (subrp (symbol-function function)) 
             (eq (cdr (subr-arity (symbol-function function))) 'unevalled))
      (error "Function %s is a special form" function))
!   (if (or (symbolp (symbol-function function)) 
          (subrp (symbol-function function)))
        ;; The function is built-in or aliased to another function.
        ;; Create a wrapper in which we can add the debug call.
        (fset function `(lambda (&rest debug-on-entry-args)
                        ,(interactive-form (symbol-function function))
!                       (apply ',(symbol-function function) 
                               debug-on-entry-args)))
      (when (eq (car-safe (symbol-function function)) 'autoload)
        ;; The function is autoloaded.  Load its real definition.
--- 656,678 ----
  ;;;###autoload
  (defun debug-on-entry (function)
    "Request FUNCTION to invoke debugger each time it is called.
+ When called interactively, prompt for FUNCTION in the minibuffer.
  If you tell the debugger to continue, FUNCTION's execution proceeds.
  This works by modifying the definition of FUNCTION,
  which must be written in Lisp, not predefined.
  Use \\[cancel-debug-on-entry] to cancel the effect of this command.
  Redefining FUNCTION also cancels it."
    (interactive "aDebug on entry (to function): ")
!   (when (and (subrp (symbol-function function))
             (eq (cdr (subr-arity (symbol-function function))) 'unevalled))
      (error "Function %s is a special form" function))
!   (if (or (symbolp (symbol-function function))
          (subrp (symbol-function function)))
        ;; The function is built-in or aliased to another function.
        ;; Create a wrapper in which we can add the debug call.
        (fset function `(lambda (&rest debug-on-entry-args)
                        ,(interactive-form (symbol-function function))
!                       (apply ',(symbol-function function)
                               debug-on-entry-args)))
      (when (eq (car-safe (symbol-function function)) 'autoload)
        ;; The function is autoloaded.  Load its real definition.
***************
*** 692,698 ****
  ;;;###autoload
  (defun cancel-debug-on-entry (&optional function)
    "Undo effect of \\[debug-on-entry] on FUNCTION.
! If argument is nil or an empty string, cancel for all functions."
    (interactive
     (list (let ((name
                (completing-read "Cancel debug on entry (to function): "
--- 693,701 ----
  ;;;###autoload
  (defun cancel-debug-on-entry (&optional function)
    "Undo effect of \\[debug-on-entry] on FUNCTION.
! If argument is nil or an empty string, cancel for all functions.
! When called interactively, prompt for FUNCTION in the minibuffer.
! To specify a nil argument interactively, exit with an empty minibuffer."
    (interactive
     (list (let ((name
                (completing-read "Cancel debug on entry (to function): "
***************
*** 739,745 ****
  (defun debug-on-entry-1 (function flag)
    (let* ((defn (symbol-function function))
         (tail defn))
!     (when (eq (car-safe tail) 'macro) 
        (setq tail (cdr tail)))
      (if (not (eq (car-safe tail) 'lambda))
        ;; Only signal an error when we try to set debug-on-entry.
--- 742,748 ----
  (defun debug-on-entry-1 (function flag)
    (let* ((defn (symbol-function function))
         (tail defn))
!     (when (eq (car-safe tail) 'macro)
        (setq tail (cdr tail)))
      (if (not (eq (car-safe tail) 'lambda))
        ;; Only signal an error when we try to set debug-on-entry.




reply via email to

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