changeset 92373:abf955d20dfa

(byte-compile-maybe-guarded): Restore code commented out 2007-11-10.
author Glenn Morris <rgm@gnu.org>
date Sat, 01 Mar 2008 20:07:28 +0000
parents 0418e6ff8eb2
children aad42cded1c9
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Sat Mar 01 19:00:24 2008 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Sat Mar 01 20:07:28 2008 +0000
@@ -3562,10 +3562,16 @@
 	  ;; emacs/xemacs tests have been optimized away, so this is
 	  ;; not doing anything useful here, is should probably be
 	  ;; moved to a different place.
-	  ;; (byte-compile-warnings
-	  ;;  (if (member ,condition '((featurep 'xemacs)
-	  ;; 			    (not (featurep 'emacs))))
-	  ;;      nil byte-compile-warnings))
+	  ;; It is doing _something_. If this is commented out, then
+	  ;; compiling a file which requires another file which
+	  ;; defines a defsubst that uses (featurep 'xemacs) results
+	  ;; in a spurious compilation warning about the xemacs code. Eg:
+	  ;; (defsubst foo () (if (featurep 'xemacs) (setq foo t)))
+	  ;; where foo is a free variable.
+	  (byte-compile-warnings
+	   (if (member ,condition '((featurep 'xemacs)
+	   			    (not (featurep 'emacs))))
+	       nil byte-compile-warnings))
 	  )
      (unwind-protect
 	 (progn ,@body)