Improve uses of CHECK_LIST etc.
commit0a49f158f1598fb92989f3cbdc238a7e5f1bd8a3
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Jan 2017 08:18:40 +0000 (22 00:18 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Jan 2017 08:25:35 +0000 (22 00:25 -0800)
tree34ff3896930886b9a072423fdb310d482bec283a
parentade0652cc2a7103cd910accda8165ff8ee7c719f
Improve uses of CHECK_LIST etc.

* src/eval.c (FletX): Report an error for invalid constructs like
‘(let* (a . 0))’, so that ‘let*’ is more consistent with ‘let’.
(lambda_arity): Use plain CHECK_CONS.
* src/fns.c (CHECK_LIST_END): Move from here to lisp.h.
(Fcopy_alist): Remove unnecessary CHECK_LIST call, since
concat does that for us.
(Fnthcdr, Fmember, Fmemql, Fdelete, Fnreverse):
Use CHECK_LIST_END, not CHECK_LIST_CONS.  This hoists a
runtime check out of the loop.
(Fmemq): Simplify and use CHECK_LIST_END instead of CHECK_LIST.
(Fassq, Fassoc, Frassq, Frassoc):
Simplify and use CHECK_LIST_END instead of CAR.
(assq_no_quit, assoc_no_quit): Simplify and assume proper list.
(Fnconc): Use plain CHECK_CONS, and do-while instead of while loop.
* src/fontset.c (Fnew_fontset):
* src/frame.c (Fmodify_frame_parameters):
Use CHECK_LIST_END at end, rather than CHECK_LIST at start, for a
more-complete check.
* src/gfilenotify.c (Fgfile_add_watch):
Omit unnecessary CHECK_LIST, since Fmember does that for us.
* src/lisp.h (lisp_h_CHECK_LIST_CONS, CHECK_LIST_CONS):
Remove; no longer used.
(CHECK_LIST_END): New inline function.
src/eval.c
src/fns.c
src/fontset.c
src/frame.c
src/gfilenotify.c
src/lisp.h