* Macro handling patch for lisp/emacs-lisp/debug.el.
@ 2005-03-10 11:19 Lute Kamstra
0 siblings, 0 replies; only message in thread
From: Lute Kamstra @ 2005-03-10 11:19 UTC (permalink / raw)
Does anybody see any problems with the following patch?
Lute.
Index: lisp/emacs-lisp/debug.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/debug.el,v
retrieving revision 1.75
diff -c -r1.75 debug.el
*** lisp/emacs-lisp/debug.el 10 Mar 2005 09:42:13 -0000 1.75
--- lisp/emacs-lisp/debug.el 10 Mar 2005 11:13:23 -0000
***************
*** 171,176 ****
--- 171,183 ----
(save-window-excursion
(with-no-warnings
(setq unread-command-char -1))
+ (when (eq (car debugger-args) 'debug)
+ ;; Skip the frames for backtrace-debug, byte-code,
+ ;; and implement-debug-on-entry.
+ (backtrace-debug 4 t)
+ ;; Place an extra debug-on-exit for macro's.
+ (when (eq 'lambda (car-safe (cadr (backtrace-frame 4))))
+ (backtrace-debug 5 t)))
(pop-to-buffer debugger-buffer)
(debugger-mode)
(debugger-setup-buffer debugger-args)
***************
*** 190,199 ****
(goto-char (point-min))
(message "%s" (buffer-string))
(kill-emacs))
- (if (eq (car debugger-args) 'debug)
- ;; Skip the frames for backtrace-debug, byte-code,
- ;; and implement-debug-on-entry.
- (backtrace-debug 4 t))
(message "")
(let ((standard-output nil)
(buffer-read-only t))
--- 197,202 ----
***************
*** 263,274 ****
;; 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 a function:\n")
! (if (eq (car debugger-args) 'debug)
! (progn
! (delete-char 1)
! (insert ?*)
! (beginning-of-line))))
;; Exiting a function.
((eq (car debugger-args) 'exit)
(insert "--returning value: ")
--- 266,272 ----
;; 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 a function:\n"))
;; Exiting a function.
((eq (car debugger-args) 'exit)
(insert "--returning value: ")
Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.7081
diff -c -r1.7081 ChangeLog
*** lisp/ChangeLog 10 Mar 2005 09:43:01 -0000 1.7081
--- lisp/ChangeLog 10 Mar 2005 11:13:46 -0000
***************
*** 10,15 ****
--- 10,19 ----
(debug, debugger-setup-buffer): Comment update.
(debugger-frame-number): Update to work with
implement-debug-on-entry.
+ (debug): Set debug-on-exit before calling debugger-setup-buffer so
+ that backtrace marks the frames set to debug-on-exit and we don't
+ have to do it manually. Set an extra debug-on-exit for macro's.
+ (debugger-setup-buffer): Don't mark the top frame manually.
2005-03-10 Jay Belanger <belanger@truman.edu>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-10 11:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-10 11:19 Macro handling patch for lisp/emacs-lisp/debug.el Lute Kamstra
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).