From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David PONCE Newsgroups: gmane.emacs.devel Subject: `error' warnings in defstruct Date: Fri, 30 Jan 2004 13:48:23 +0100 (CET) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <4403115.1075466903675.JavaMail.www@wwinf0802> Reply-To: david.ponce@wanadoo.fr NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1075467723 28839 80.91.224.253 (30 Jan 2004 13:02:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2004 13:02:03 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jan 30 14:01:57 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AmYHU-0007HL-00 for ; Fri, 30 Jan 2004 14:01:56 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AmYHU-0004kg-00 for ; Fri, 30 Jan 2004 14:01:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AmY7R-0005lS-4k for emacs-devel@quimby.gnus.org; Fri, 30 Jan 2004 07:51:33 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AmY6i-0005kC-7g for emacs-devel@gnu.org; Fri, 30 Jan 2004 07:50:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AmY6B-0005ex-PE for emacs-devel@gnu.org; Fri, 30 Jan 2004 07:50:46 -0500 Original-Received: from [193.252.22.23] (helo=mwinf0804.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AmY4O-0005Mr-Sf for emacs-devel@gnu.org; Fri, 30 Jan 2004 07:48:25 -0500 Original-Received: from wwinf0802 (wwinf0802 [172.22.139.29]) by mwinf0804.wanadoo.fr (SMTP Server) with ESMTP id A7A9F1800135 for ; Fri, 30 Jan 2004 13:48:23 +0100 (CET) Original-To: emacs-devel X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19569 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19569 Hi, Here is a small patch that fixes a mismatch between the number of `format' %-sequences and arguments in `error' statements generated by the `defstruct' macro. I discovered that since the (nice) byte-compiler change that now make it warn in such cases :-) Hope it will help. David 2004-01-30 David Ponce * cl-macs.el (defstruct): Fix missing %-sequence in generated error statement. (cl-struct-setf-expander): Ditto. Index: lisp/emacs-lisp/cl-macs.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/cl-macs.el,v retrieving revision 1.43 diff -c -r1.43 cl-macs.el *** lisp/emacs-lisp/cl-macs.el 1 Sep 2003 15:45:20 -0000 1.43 --- lisp/emacs-lisp/cl-macs.el 30 Jan 2004 12:30:04 -0000 *************** *** 2260,2266 **** (and pred-check (list (list 'or pred-check (list 'error ! (format "%s accessing a non-%s" accessor name) 'cl-x)))) (list (if (eq type 'vector) (list 'aref 'cl-x pos) --- 2260,2266 ---- (and pred-check (list (list 'or pred-check (list 'error ! (format "%s accessing a non-%s %%S" accessor name) 'cl-x)))) (list (if (eq type 'vector) (list 'aref 'cl-x pos) *************** *** 2340,2346 **** (list (list 'or (subst temp 'cl-x pred-form) (list 'error (format ! "%s storing a non-%s" accessor name) temp)))) (list (if (eq (car (get name 'cl-struct-type)) 'vector) (list 'aset temp pos store) --- 2340,2346 ---- (list (list 'or (subst temp 'cl-x pred-form) (list 'error (format ! "%s storing a non-%s %%S" accessor name) temp)))) (list (if (eq (car (get name 'cl-struct-type)) 'vector) (list 'aset temp pos store)