comparison src/fns.c @ 5336:287499ff4c5f

Pass in the DEFAULT argument to position() as documented, #'find. src/ChangeLog addition: 2011-01-14 Aidan Kehoe <kehoea@parhasard.net> * fns.c (Ffind): Use the correct subr information here, pass in the DEFAULT keyword argument value correctly. tests/ChangeLog addition: 2011-01-14 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el (list): Test #'find, especially the :default keyword, not specified by Common Lisp.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 14 Jan 2011 23:16:25 +0000
parents 1dbc93b7ba19
children 8608eadee6ba
comparison
equal deleted inserted replaced
5335:c9d31263ab7d 5336:287499ff4c5f
3121 { 3121 {
3122 Lisp_Object object = Qnil, item = args[0], sequence = args[1]; 3122 Lisp_Object object = Qnil, item = args[0], sequence = args[1];
3123 Boolint test_not_unboundp = 1; 3123 Boolint test_not_unboundp = 1;
3124 check_test_func_t check_test = NULL; 3124 check_test_func_t check_test = NULL;
3125 3125
3126 PARSE_KEYWORDS (Fposition, nargs, args, 9, 3126 PARSE_KEYWORDS (Ffind, nargs, args, 9,
3127 (test, if_, test_not, if_not, key, start, end, from_end, 3127 (test, if_, test_not, if_not, key, start, end, from_end,
3128 default_), 3128 default_),
3129 (start = Qzero)); 3129 (start = Qzero));
3130 3130
3131 check_test = get_check_test_function (item, &test, test_not, if_, if_not, 3131 check_test = get_check_test_function (item, &test, test_not, if_, if_not,
3132 key, &test_not_unboundp); 3132 key, &test_not_unboundp);
3133 3133
3134 position (&object, item, sequence, check_test, test_not_unboundp, 3134 position (&object, item, sequence, check_test, test_not_unboundp,
3135 test, key, start, end, from_end, Qnil, Qposition); 3135 test, key, start, end, from_end, default_, Qposition);
3136 3136
3137 return object; 3137 return object;
3138 } 3138 }
3139 3139
3140 DEFUN ("delete", Fdelete, 2, 2, 0, /* 3140 DEFUN ("delete", Fdelete, 2, 2, 0, /*