]> git.eshelyaron.com Git - emacs.git/commitdiff
(debug): Fix arg to backtrace-debug for debug-on-entry.
authorRichard M. Stallman <rms@gnu.org>
Mon, 13 Feb 1995 08:47:59 +0000 (08:47 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 13 Feb 1995 08:47:59 +0000 (08:47 +0000)
lisp/emacs-lisp/debug.el

index 6e830e75197c99547f43d02400d2d929d224f389..462f551142d063d40b7e831babe1dc8be0b70776 100644 (file)
@@ -104,14 +104,19 @@ first will be printed into the backtrace buffer."
                               (forward-line 1)
                               (point)))
              (debugger-reenable)
+             ;; lambda is for debug-on-call when a function call is next.
+             ;; debug is for debug-on-entry function called.
              (cond ((memq (car debugger-args) '(lambda debug))
                     (insert "Entering:\n")
                     (if (eq (car debugger-args) 'debug)
                         (progn
-                          (backtrace-debug 4 t)
+                          ;; Skip the frames for backtrace-debug, byte-code,
+                          ;; and debug.
+                          (backtrace-debug 3 t)
                           (delete-char 1)
                           (insert ?*)
                           (beginning-of-line))))
+                   ;; Exiting a function.
                    ((eq (car debugger-args) 'exit)
                     (insert "Return value: ")
                     (setq debugger-value (nth 1 debugger-args))
@@ -120,12 +125,15 @@ first will be printed into the backtrace buffer."
                     (delete-char 1)
                     (insert ? )
                     (beginning-of-line))
+                   ;; Debugger entered for an error.
                    ((eq (car debugger-args) 'error)
                     (insert "Signalling: ")
                     (prin1 (nth 1 debugger-args) (current-buffer))
                     (insert ?\n))
+                   ;; debug-on-call, when the next thing is an eval.
                    ((eq (car debugger-args) t)
                     (insert "Beginning evaluation of function call form:\n"))
+                   ;; User calls debug directly.
                    (t
                     (prin1 (if (eq (car debugger-args) 'nil)
                                (cdr debugger-args) debugger-args)