1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 02:51:31 -08:00

Add two docstrings in cl-macs.el

* lisp/emacs-lisp/cl-macs.el (cl--simple-exprs-p)
(cl--const-expr-p): Add docstrings
This commit is contained in:
Jeremy Bryant 2023-10-31 23:37:10 +00:00 committed by Stefan Monnier
parent a61cc138ed
commit 445029da58

View file

@ -101,6 +101,7 @@
(and (> size 0) (1- size))))
(defun cl--simple-exprs-p (xs)
"Map `cl--simple-expr-p' to each element of list XS."
(while (and xs (cl--simple-expr-p (car xs)))
(setq xs (cdr xs)))
(not xs))
@ -116,8 +117,10 @@
(while (and (setq x (cdr x)) (cl--safe-expr-p (car x))))
(null x)))))
;;; Check if constant (i.e., no side effects or dependencies).
(defun cl--const-expr-p (x)
"Check if X is constant (i.e., no side effects or dependencies).
See `macroexp-const-p' for similar functionality without cl-lib dependency."
(cond ((consp x)
(or (eq (car x) 'quote)
(and (memq (car x) '(function cl-function))