From 7ca865dc52a31374c68dc870246353db5acc023c Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 2 Dec 2021 10:19:10 +0100 Subject: Add `cl-constantly' function * lisp/emacs-lisp/cl-lib.el (cl-constantly): Add Common Lisp function missing (bug#21584). --- test/lisp/emacs-lisp/cl-lib-tests.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/lisp/emacs-lisp') diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el b/test/lisp/emacs-lisp/cl-lib-tests.el index 854e371b32f..a0facc81dbe 100644 --- a/test/lisp/emacs-lisp/cl-lib-tests.el +++ b/test/lisp/emacs-lisp/cl-lib-tests.el @@ -551,4 +551,9 @@ (should cl-old-struct-compat-mode) (cl-old-struct-compat-mode (if saved 1 -1)))) +(ert-deftest cl-constantly () + (should (equal (mapcar (cl-constantly 3) '(a b c d)) + '(3 3 3 3)))) + + ;;; cl-lib-tests.el ends here -- cgit v1.2.3