summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2008-03-01 20:07:28 +0000
committerGlenn Morris <rgm@gnu.org>2008-03-01 20:07:28 +0000
commitc01e3aa1dd399f959b57e810c28da6faa6739a5f (patch)
tree657fe6923c4e653ab35e712e670e8e1adbc58379 /lisp/emacs-lisp
parent94dc593ff454b8754c8a381c9a356e81da10f2ff (diff)
downloademacs-c01e3aa1dd399f959b57e810c28da6faa6739a5f.tar.gz
emacs-c01e3aa1dd399f959b57e810c28da6faa6739a5f.tar.bz2
emacs-c01e3aa1dd399f959b57e810c28da6faa6739a5f.zip
(byte-compile-maybe-guarded): Restore code commented out 2007-11-10.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 356f0d7890b..064a7aeb768 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -3562,10 +3562,16 @@ that suppresses all warnings during execution of BODY."
;; 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)