changeset 74592:5d1c79927b08

(defstruct): Suppress warnings about calls to cl-struct-setf-expander.
author Richard M. Stallman <rms@gnu.org>
date Mon, 11 Dec 2006 04:36:04 +0000
parents 8009e4055e37
children 40a1830ca2db
files lisp/emacs-lisp/cl-macs.el
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/cl-macs.el	Mon Dec 11 03:40:07 2006 +0000
+++ b/lisp/emacs-lisp/cl-macs.el	Mon Dec 11 04:36:04 2006 +0000
@@ -2292,10 +2292,15 @@
 			     (if (cadr (memq :read-only (cddr desc)))
 				 (list 'error (format "%s is a read-only slot"
 						      accessor))
-			       (list 'cl-struct-setf-expander 'cl-x
-				     (list 'quote name) (list 'quote accessor)
-				     (and pred-check (list 'quote pred-check))
-				     pos)))
+			       ;; If cl is loaded only for compilation,
+			       ;; the call to cl-struct-setf-expander would
+			       ;; cause a warning because it may not be
+			       ;; defined at run time.  Suppress that warning.
+			       (list 'with-no-warnings
+				     (list 'cl-struct-setf-expander 'cl-x
+					   (list 'quote name) (list 'quote accessor)
+					   (and pred-check (list 'quote pred-check))
+					   pos))))
 		       forms)
 	      (if print-auto
 		  (nconc print-func