Mercurial > hg > xemacs-beta
comparison lisp/byte-optimize.el @ 4160:f35582fa32a9
[xemacs-hg @ 2007-09-03 13:16:39 by viteno]
Steve Youngs' commit 'bot
author | viteno |
---|---|
date | Mon, 03 Sep 2007 13:16:44 +0000 |
parents | 6c21360a544b |
children | effc49a3bfb9 |
comparison
equal
deleted
inserted
replaced
4159:bccd25cf2f5c | 4160:f35582fa32a9 |
---|---|
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))) | 1170 form))) |
1171 | |
1172 (put 'featurep 'byte-optimizer 'byte-optimize-featurep) | |
1173 (defun byte-optimize-featurep (form) | |
1174 (let ((str (prin1-to-string (cdr-safe form))) | |
1175 (regex #r"\s-+s?xemacs\(\s-\|)\)")) | |
1176 (if (string-match regex str) | |
1177 (byte-optimize-predicate form) | |
1178 form))) | |
1179 | |
1171 | 1180 |
1172 ;;; enumerating those functions which need not be called if the returned | 1181 ;;; enumerating those functions which need not be called if the returned |
1173 ;;; value is not used. That is, something like | 1182 ;;; value is not used. That is, something like |
1174 ;;; (progn (list (something-with-side-effects) (yow)) | 1183 ;;; (progn (list (something-with-side-effects) (yow)) |
1175 ;;; (foo)) | 1184 ;;; (foo)) |