comparison lisp/byte-optimize.el @ 4228:ce594b233b20

[xemacs-hg @ 2007-10-15 10:55:49 by aidan] Add a correct version of the (featurep 'xemacs) optimisation.
author aidan
date Mon, 15 Oct 2007 10:55:49 +0000
parents effc49a3bfb9
children 9eb558ffe8ff
comparison
equal deleted inserted replaced
4227:dd9c1d5f5319 4228:ce594b233b20
1165 (or (byte-compile-constp (car args)) 1165 (or (byte-compile-constp (car args))
1166 (setq constant nil)) 1166 (setq constant nil))
1167 (setq args (cdr args))) 1167 (setq args (cdr args)))
1168 (if constant 1168 (if constant
1169 (eval form) 1169 (eval form)
1170 form)))
1171
1172 (defvar byte-optimize-ever-present-features
1173 '(xemacs cl cl-extra cl-19 backquote))
1174
1175 (put 'featurep 'byte-optimizer 'byte-optimize-featurep)
1176 (defun byte-optimize-featurep (form)
1177 (let ((to-check (cdr-safe form)))
1178 (if (memq (car-safe
1179 (cdr-safe
1180 (car-safe
1181 (cdr-safe
1182 form))))
1183 byte-optimize-ever-present-features)
1184 t
1170 form))) 1185 form)))
1171 1186
1172 1187
1173 ;;; enumerating those functions which need not be called if the returned 1188 ;;; enumerating those functions which need not be called if the returned
1174 ;;; value is not used. That is, something like 1189 ;;; value is not used. That is, something like