From: Richard M. Stallman Date: Sun, 27 Feb 2005 09:57:51 +0000 (+0000) Subject: (debug-on-entry-1): If function body is empty, add nil as body form. X-Git-Tag: ttn-vms-21-2-B4~2097 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e29824bddcc3e5bb25e75115f72cd2bc6344c327;p=emacs.git (debug-on-entry-1): If function body is empty, add nil as body form. --- diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 1a6ed584548..58fb3b4a1b8 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -704,6 +704,10 @@ If argument is nil or an empty string, cancel for all functions." ;; Skip the interactive form. (if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail))) (unless (eq flag (equal (car tail) '(debug 'debug))) + ;; 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))