comparison lisp/cl-macs.el @ 5084:6afe991b8135

Add a PARSE_KEYWORDS macro, use it in #'make-hash-table. lisp/ChangeLog addition: 2010-03-01 Aidan Kehoe <kehoea@parhasard.net> * cl-seq.el (cl-parsing-keywords): * cl-macs.el (cl-do-arglist): Use the new invalid-keyword-argument error here. src/ChangeLog addition: 2010-03-01 Aidan Kehoe <kehoea@parhasard.net> * lisp.h (PARSE_KEYWORDS): New macro, for parsing keyword arguments from C subrs. * elhash.c (Fmake_hash_table): Use it. * general-slots.h (Q_allow_other_keys): Add this symbol. * eval.c (non_nil_allow_other_keys_p): (invalid_keyword_argument): New functions, called from the keyword argument parsing code. * data.c (init_errors_once_early): Add the new invalid-keyword-argument error here.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 01 Mar 2010 21:05:33 +0000
parents 5502045ec510
children 1ee30d3f9dd0
comparison
equal deleted inserted replaced
5083:88f955fa5a7f 5084:6afe991b8135
492 restarg))) 492 restarg)))
493 (list 'setq var nil)) 493 (list 'setq var nil))
494 (list t 494 (list t
495 (list 495 (list
496 'error 496 'error
497 (format "Keyword argument %%s not one of %s" 497 ''invalid-keyword-argument
498 keys)
499 (list 'car var))))))) 498 (list 'car var)))))))
500 (push (list 'let (list (list var restarg)) check) bind-forms))) 499 (push (list 'let (list (list var restarg)) check) bind-forms)))
501 (while (and (eq (car args) '&aux) (pop args)) 500 (while (and (eq (car args) '&aux) (pop args))
502 (while (and args (not (memq (car args) lambda-list-keywords))) 501 (while (and args (not (memq (car args) lambda-list-keywords)))
503 (if (consp (car args)) 502 (if (consp (car args))