diff 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
line wrap: on
line diff
--- a/lisp/byte-optimize.el	Sun Sep 02 21:51:36 2007 +0000
+++ b/lisp/byte-optimize.el	Mon Sep 03 13:16:44 2007 +0000
@@ -1168,6 +1168,15 @@
     (if constant
 	(eval form)
       form)))
+
+(put 'featurep 'byte-optimizer 'byte-optimize-featurep)
+(defun byte-optimize-featurep (form)
+  (let ((str (prin1-to-string (cdr-safe form)))
+	(regex #r"\s-+s?xemacs\(\s-\|)\)"))
+    (if (string-match regex str)
+	(byte-optimize-predicate form)
+      form)))
+
 
 ;;; enumerating those functions which need not be called if the returned
 ;;; value is not used.  That is, something like