(debug-on-entry-1): If function body is empty, add nil as body form.

This commit is contained in:
Richard M. Stallman 2005-02-27 09:57:51 +00:00
parent 91f1fd029f
commit e29824bddc

View file

@ -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))