Function: cl--const-expr-p

cl--const-expr-p is a byte-compiled function defined in cl-macs.el.gz.

Signature

(cl--const-expr-p X)

Documentation

Check if X is constant (i.e., no side effects or dependencies).

See macroexp-const-p for similar functionality without cl-lib dependency.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-macs.el.gz
(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))
		  (or (symbolp (nth 1 x))
		      (and (eq (car-safe (nth 1 x)) 'lambda) 'func)))))
	((symbolp x) (and (memq x '(nil t)) t))
	(t t)))