summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/ert.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/ert.el')
-rw-r--r--lisp/emacs-lisp/ert.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index be9f013ebcf..4ea894f4ede 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -237,7 +237,9 @@ in batch mode, an error is signaled.
`(:expected-result-type ,expected-result))
,@(when tags-supplied-p
`(:tags ,tags))
- :body (lambda () ,@body)
+ ;; Add `nil' after the body to enable compiler warnings
+ ;; about unused computations at the end.
+ :body (lambda () ,@body nil)
:file-name ,(or (macroexp-file-name) buffer-file-name)))
',name))))