diff options
| -rw-r--r-- | lisp/emacs-lisp/debug.el | 4 |
1 files changed, 4 insertions, 0 deletions
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." | |||
| 704 | ;; Skip the interactive form. | 704 | ;; Skip the interactive form. |
| 705 | (if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail))) | 705 | (if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail))) |
| 706 | (unless (eq flag (equal (car tail) '(debug 'debug))) | 706 | (unless (eq flag (equal (car tail) '(debug 'debug))) |
| 707 | ;; If the function has no body, add nil as a body element. | ||
| 708 | (when (null tail) | ||
| 709 | (setq tail (list nil)) | ||
| 710 | (nconc defn tail)) | ||
| 707 | ;; Add/remove debug statement as needed. | 711 | ;; Add/remove debug statement as needed. |
| 708 | (if (not flag) | 712 | (if (not flag) |
| 709 | (progn (setcar tail (cadr tail)) | 713 | (progn (setcar tail (cadr tail)) |