unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David PONCE <david.ponce@wanadoo.fr>
Subject: `error' warnings in defstruct
Date: Fri, 30 Jan 2004 13:48:23 +0100 (CET)	[thread overview]
Message-ID: <4403115.1075466903675.JavaMail.www@wwinf0802> (raw)

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  <david@dponce.com>

	* 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)

                 reply	other threads:[~2004-01-30 12:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4403115.1075466903675.JavaMail.www@wwinf0802 \
    --to=david.ponce@wanadoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).