Mercurial > hg > xemacs-beta
comparison lisp/cl-macs.el @ 5316:9ac28212c75a
#'cl-safe-expr-p, forms that start with the symbol lambda are also safe.
2010-12-29 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (cl-safe-expr-p):
Forms that start with the symbol lambda are also safe.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 29 Dec 2010 23:53:48 +0000 |
parents | 596011a8bf8f |
children | 8aa511adfad6 |
comparison
equal
deleted
inserted
replaced
5315:2a7b6ddb8063 | 5316:9ac28212c75a |
---|---|
109 (setq xs (cdr xs))) | 109 (setq xs (cdr xs))) |
110 (not xs)) | 110 (not xs)) |
111 | 111 |
112 ;;; Check if no side effects. | 112 ;;; Check if no side effects. |
113 (defun cl-safe-expr-p (x) | 113 (defun cl-safe-expr-p (x) |
114 (or (not (and (consp x) (not (memq (car x) '(quote function function*))))) | 114 (or (not (and (consp x) (not (memq (car x) |
115 '(quote function function* lambda))))) | |
115 (and (symbolp (car x)) | 116 (and (symbolp (car x)) |
116 (or (memq (car x) cl-simple-funcs) | 117 (or (memq (car x) cl-simple-funcs) |
117 (memq (car x) cl-safe-funcs) | 118 (memq (car x) cl-safe-funcs) |
118 (get (car x) 'side-effect-free)) | 119 (get (car x) 'side-effect-free)) |
119 (progn | 120 (progn |