# HG changeset patch # User Richard M. Stallman # Date 1165811764 0 # Node ID 5d1c79927b087ff87aa3d521ccb8922bd7376a5c # Parent 8009e4055e37704078c4a161e1c957a09b00edeb (defstruct): Suppress warnings about calls to cl-struct-setf-expander. diff -r 8009e4055e37 -r 5d1c79927b08 lisp/emacs-lisp/cl-macs.el --- 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