From a29cf450570804d3e1023f5d13bb725156b4a9ac Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 7 Mar 2005 14:12:27 +0000 Subject: (debug-on-entry-1): Fix handling of macros. --- lisp/ChangeLog | 12 +++++++----- lisp/emacs-lisp/debug.el | 37 ++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 24 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2ee4f48fac..df930a970d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-03-07 Stefan Monnier + + * emacs-lisp/debug.el (debug-on-entry-1): Fix handling of macros. + 2005-03-07 Kim F. Storm * simple.el (move-beginning-of-line): New command. @@ -100,14 +104,12 @@ * calendar/icalendar.el (icalendar-version): Increase to 0.11. (icalendar-export-file, icalendar-export-region) - (icalendar-import-file, icalendar-import-buffer): Add autoload - cookies. + (icalendar-import-file, icalendar-import-buffer): Add autoload cookies. (icalendar--convert-ical-to-diary): Fix problem with DURATION. 2005-03-04 Lute Kamstra - * emacs-lisp/debug.el (debugger-step-after-exit): Make it a - defvar. + * emacs-lisp/debug.el (debugger-step-after-exit): Make it a defvar. (debug-function-list): Ditto. 2005-03-04 Robert J. Chassell @@ -117,7 +119,7 @@ is not appended by replacing a search for `@refill\\|@bye' with `@refill\\|^[ \t]*@'. The intent is to solve both the `@end itemize@refill' bug and the unfilled long lines bug. - (texinfmt-version): update number and date. + (texinfmt-version): Update number and date. 2005-03-04 Reiner Steib diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index ab197e8e11..67836215da 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -693,25 +693,24 @@ If argument is nil or an empty string, cancel for all functions." (fset function (cons 'lambda (cons (car contents) body))))))) (defun debug-on-entry-1 (function defn flag) - (if (subrp defn) - (error "%s is a built-in function" function) - (if (eq (car defn) 'macro) - (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)))) + (let ((tail defn)) + (if (subrp tail) + (error "%s is a built-in function" function) + (if (eq (car tail) 'macro) (setq tail (cdr tail))) + (if (eq (car tail) 'lambda) (setq tail (cdr tail)) + (error "%s not user-defined Lisp function" function)) + ;; 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 () "Display a list of all the functions now set to debug on entry." -- cgit v1.2.3