Mercurial > hg > xemacs-beta
comparison src/lisp.h @ 5772:cd4f5f1f1f4c
Add #'write-sequence, on the model of #'write-char, API from Common Lisp.
src/ChangeLog addition:
2013-12-17 Aidan Kehoe <kehoea@parhasard.net>
* lisp.h:
* lisp.h (PARSE_KEYWORDS_8):
Correct this in cases where we can have noticeably fewer arguments
than KEYWORDS_OFFSET, check whether nargs > pk_offset.
Declare check_sequence_range in this header.
* print.c:
* print.c (Fwrite_sequence) New:
Write a sequence to a stream, in the same way #'write-char and
#'terpri do. API from Common Lisp, not GNU, so while there is some
char-int confoundance, it's more limited than usual with GNU APIs.
* print.c (syms_of_print):
Make it available.
* sequence.c (check_sequence_range):
Export this to other files.
lisp/ChangeLog addition:
2013-12-17 Aidan Kehoe <kehoea@parhasard.net>
* cl-extra.el:
* cl-extra.el (write-string): New.
* cl-extra.el (write-line): New.
Add these here, implemented in terms of #'write-sequence in print.c.
tests/ChangeLog addition:
2013-12-17 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el:
Up max-lisp-eval-depth when compiling this file, some of what
we're doing in testing #'write-sequence is demanding.
* automated/lisp-tests.el (make-circular-list):
New argument VALUE, the car of the conses to create.
* automated/lisp-tests.el:
Test #'write-sequence, #'write-string, #'write-line with function,
buffer and marker STREAMs; test argument types, keyword argument
ranges and values.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 17 Dec 2013 19:29:10 +0200 |
parents | 3192994c49ca |
children | 72c5d36ba3b6 |
comparison
equal
deleted
inserted
replaced
5771:72a9467f93fc | 5772:cd4f5f1f1f4c |
---|---|
3631 { \ | 3631 { \ |
3632 Lisp_Object pk_key, pk_value; \ | 3632 Lisp_Object pk_key, pk_value; \ |
3633 Elemcount pk_i = nargs - 1, pk_offset = keywords_offset; \ | 3633 Elemcount pk_i = nargs - 1, pk_offset = keywords_offset; \ |
3634 Boolint pk_allow_other_keys = allow_other_keys; \ | 3634 Boolint pk_allow_other_keys = allow_other_keys; \ |
3635 \ | 3635 \ |
3636 if ((nargs - pk_offset) & 1) \ | 3636 if ((nargs - pk_offset) & 1 && (nargs > pk_offset)) \ |
3637 { \ | 3637 { \ |
3638 if (!allow_other_keys \ | 3638 if (!allow_other_keys \ |
3639 && !(pk_allow_other_keys \ | 3639 && !(pk_allow_other_keys \ |
3640 = non_nil_allow_other_keys_p (pk_offset, \ | 3640 = non_nil_allow_other_keys_p (pk_offset, \ |
3641 nargs, args))) \ | 3641 nargs, args))) \ |
5305 EXFUN (Fstring_equal, 2); | 5305 EXFUN (Fstring_equal, 2); |
5306 EXFUN (Fstring_lessp, 2); | 5306 EXFUN (Fstring_lessp, 2); |
5307 EXFUN (Fsubseq, 3); | 5307 EXFUN (Fsubseq, 3); |
5308 EXFUN (Fvalid_plist_p, 1); | 5308 EXFUN (Fvalid_plist_p, 1); |
5309 | 5309 |
5310 extern void check_sequence_range (Lisp_Object, Lisp_Object, Lisp_Object, | |
5311 Lisp_Object); | |
5312 | |
5310 extern Boolint check_eq_nokey (Lisp_Object, Lisp_Object, Lisp_Object, | 5313 extern Boolint check_eq_nokey (Lisp_Object, Lisp_Object, Lisp_Object, |
5311 Lisp_Object); | 5314 Lisp_Object); |
5312 extern Boolint check_lss_key_car (Lisp_Object, Lisp_Object, Lisp_Object, | 5315 extern Boolint check_lss_key_car (Lisp_Object, Lisp_Object, Lisp_Object, |
5313 Lisp_Object); | 5316 Lisp_Object); |
5314 extern Boolint check_string_lessp_nokey (Lisp_Object, Lisp_Object, | 5317 extern Boolint check_string_lessp_nokey (Lisp_Object, Lisp_Object, |