Add `cl-constantly' function
* lisp/emacs-lisp/cl-lib.el (cl-constantly): Add Common Lisp function missing (bug#21584).
This commit is contained in:
parent
5db380abad
commit
7ca865dc52
2 changed files with 10 additions and 0 deletions
|
@ -560,4 +560,9 @@ of record objects."
|
|||
(t
|
||||
(advice-remove 'type-of #'cl--old-struct-type-of))))
|
||||
|
||||
(defun cl-constantly (value)
|
||||
"Return a function that takes any number of arguments, but returns VALUE."
|
||||
(lambda (&rest _)
|
||||
value))
|
||||
|
||||
;;; cl-lib.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue