diff options
| author | Richard M. Stallman | 2005-02-27 09:57:51 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-02-27 09:57:51 +0000 |
| commit | e29824bddcc3e5bb25e75115f72cd2bc6344c327 (patch) | |
| tree | 9491b068df8c9555ce4a78b495db534588f43711 | |
| parent | 91f1fd029f448b723a4c58c85c10f2c89324a057 (diff) | |
| download | emacs-e29824bddcc3e5bb25e75115f72cd2bc6344c327.tar.gz emacs-e29824bddcc3e5bb25e75115f72cd2bc6344c327.zip | |
(debug-on-entry-1): If function body is empty, add nil as body form.
| -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)) |