comparison lisp/cl-seq.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 7d7ae8db0341
children 2e528066e2fc
comparison
equal deleted inserted replaced
5083:88f955fa5a7f 5084:6afe991b8135
105 (car x) x))) 105 (car x) x)))
106 (append kwords 106 (append kwords
107 other-keys)))) 107 other-keys))))
108 '(car (cdr (memq (quote :allow-other-keys) 108 '(car (cdr (memq (quote :allow-other-keys)
109 cl-keys))) 109 cl-keys)))
110 '(error "Bad keyword argument %s" 110 '(error 'invalid-keyword-argument
111 (car cl-keys-temp))) 111 (car cl-keys-temp)))
112 '(setq cl-keys-temp (cdr (cdr cl-keys-temp))))))) 112 '(setq cl-keys-temp (cdr (cdr cl-keys-temp)))))))
113 body)))) 113 body))))
114 (put 'cl-parsing-keywords 'lisp-indent-function 2) 114 (put 'cl-parsing-keywords 'lisp-indent-function 2)
115 (put 'cl-parsing-keywords 'edebug-form-spec '(sexp sexp &rest form)) 115 (put 'cl-parsing-keywords 'edebug-form-spec '(sexp sexp &rest form))