Fix wrong value of `when` and `unless` with empty body (bug#74215)
authorMattias EngdegÄrd <mattiase@acm.org>
Wed, 6 Nov 2024 12:29:23 +0000 (13:29 +0100)
committerEli Zaretskii <eliz@gnu.org>
Wed, 6 Nov 2024 13:27:33 +0000 (15:27 +0200)
commite88309eef30abca327c845fe4133d758d33cfb6b
treee6cd7619246c7b35e1b8af0ec9dd9f23e3e69cd7
parent3231af3727b450404efd6f49ddf5c95c5a8cbb0f
Fix wrong value of `when` and `unless` with empty body (bug#74215)

* lisp/subr.el (when, unless): Return nil when the body is empty.
Reported by Brennan Vincent.
* test/lisp/subr-tests.el (subr-test-when): Add test cases.

(cherry picked from commit 9ee9154247454c18f9f75d0d32592b817d7e977a)
lisp/subr.el
test/lisp/subr-tests.el