changeset 60279:52c2e5309a41

(debug-on-entry-1): If function body is empty, add nil as body form.
author Richard M. Stallman <rms@gnu.org>
date Sun, 27 Feb 2005 09:57:51 +0000
parents f69c04fae9ff
children f0850dec46a9
files lisp/emacs-lisp/debug.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/debug.el	Sun Feb 27 09:18:15 2005 +0000
+++ b/lisp/emacs-lisp/debug.el	Sun Feb 27 09:57:51 2005 +0000
@@ -704,6 +704,10 @@
 	;; 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))