Mercurial > hg > xemacs-beta
comparison src/fns.c @ 5118:e0db3c197671 ben-lisp-object
merge up to latest default branch, doesn't compile yet
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 26 Dec 2009 21:18:49 -0600 |
parents | 3742ea8250b5 80cd90837ac5 |
children | 623d57b7fbe8 |
comparison
equal
deleted
inserted
replaced
5117:3742ea8250b5 | 5118:e0db3c197671 |
---|---|
127 static const struct memory_description bit_vector_description[] = { | 127 static const struct memory_description bit_vector_description[] = { |
128 { XD_END } | 128 { XD_END } |
129 }; | 129 }; |
130 | 130 |
131 | 131 |
132 DEFINE_SIZABLE_LISP_OBJECT ("bit-vector", bit_vector, | 132 DEFINE_DUMPABLE_SIZABLE_LISP_OBJECT ("bit-vector", bit_vector, |
133 mark_bit_vector, | 133 mark_bit_vector, |
134 print_bit_vector, 0, | 134 print_bit_vector, 0, |
135 bit_vector_equal, | 135 bit_vector_equal, |
136 bit_vector_hash, | 136 bit_vector_hash, |
137 bit_vector_description, | 137 bit_vector_description, |
500 Concatenate all the arguments and make the result a list. | 500 Concatenate all the arguments and make the result a list. |
501 The result is a list whose elements are the elements of all the arguments. | 501 The result is a list whose elements are the elements of all the arguments. |
502 Each argument may be a list, vector, bit vector, or string. | 502 Each argument may be a list, vector, bit vector, or string. |
503 The last argument is not copied, just used as the tail of the new list. | 503 The last argument is not copied, just used as the tail of the new list. |
504 Also see: `nconc'. | 504 Also see: `nconc'. |
505 | |
506 arguments: (&rest ARGS) | |
505 */ | 507 */ |
506 (int nargs, Lisp_Object *args)) | 508 (int nargs, Lisp_Object *args)) |
507 { | 509 { |
508 return concat (nargs, args, c_cons, 1); | 510 return concat (nargs, args, c_cons, 1); |
509 } | 511 } |
515 | 517 |
516 As of XEmacs 21.0, this function does NOT accept individual integers | 518 As of XEmacs 21.0, this function does NOT accept individual integers |
517 as arguments. Old code that relies on, for example, (concat "foo" 50) | 519 as arguments. Old code that relies on, for example, (concat "foo" 50) |
518 returning "foo50" will fail. To fix such code, either apply | 520 returning "foo50" will fail. To fix such code, either apply |
519 `int-to-string' to the integer argument, or use `format'. | 521 `int-to-string' to the integer argument, or use `format'. |
522 | |
523 arguments: (&rest ARGS) | |
520 */ | 524 */ |
521 (int nargs, Lisp_Object *args)) | 525 (int nargs, Lisp_Object *args)) |
522 { | 526 { |
523 return concat (nargs, args, c_string, 0); | 527 return concat (nargs, args, c_string, 0); |
524 } | 528 } |
525 | 529 |
526 DEFUN ("vconcat", Fvconcat, 0, MANY, 0, /* | 530 DEFUN ("vconcat", Fvconcat, 0, MANY, 0, /* |
527 Concatenate all the arguments and make the result a vector. | 531 Concatenate all the arguments and make the result a vector. |
528 The result is a vector whose elements are the elements of all the arguments. | 532 The result is a vector whose elements are the elements of all the arguments. |
529 Each argument may be a list, vector, bit vector, or string. | 533 Each argument may be a list, vector, bit vector, or string. |
534 | |
535 arguments: (&rest ARGS) | |
530 */ | 536 */ |
531 (int nargs, Lisp_Object *args)) | 537 (int nargs, Lisp_Object *args)) |
532 { | 538 { |
533 return concat (nargs, args, c_vector, 0); | 539 return concat (nargs, args, c_vector, 0); |
534 } | 540 } |
535 | 541 |
536 DEFUN ("bvconcat", Fbvconcat, 0, MANY, 0, /* | 542 DEFUN ("bvconcat", Fbvconcat, 0, MANY, 0, /* |
537 Concatenate all the arguments and make the result a bit vector. | 543 Concatenate all the arguments and make the result a bit vector. |
538 The result is a bit vector whose elements are the elements of all the | 544 The result is a bit vector whose elements are the elements of all the |
539 arguments. Each argument may be a list, vector, bit vector, or string. | 545 arguments. Each argument may be a list, vector, bit vector, or string. |
546 | |
547 arguments: (&rest ARGS) | |
540 */ | 548 */ |
541 (int nargs, Lisp_Object *args)) | 549 (int nargs, Lisp_Object *args)) |
542 { | 550 { |
543 return concat (nargs, args, c_bit_vector, 0); | 551 return concat (nargs, args, c_bit_vector, 0); |
544 } | 552 } |
3061 Only the last argument is not altered, and need not be a list. | 3069 Only the last argument is not altered, and need not be a list. |
3062 Also see: `append'. | 3070 Also see: `append'. |
3063 If the first argument is nil, there is no way to modify it by side | 3071 If the first argument is nil, there is no way to modify it by side |
3064 effect; therefore, write `(setq foo (nconc foo list))' to be sure of | 3072 effect; therefore, write `(setq foo (nconc foo list))' to be sure of |
3065 changing the value of `foo'. | 3073 changing the value of `foo'. |
3074 | |
3075 arguments: (&rest ARGS) | |
3066 */ | 3076 */ |
3067 (int nargs, Lisp_Object *args)) | 3077 (int nargs, Lisp_Object *args)) |
3068 { | 3078 { |
3069 int argnum = 0; | 3079 int argnum = 0; |
3070 struct gcpro gcpro1; | 3080 struct gcpro gcpro1; |
3573 LOADHIST_ATTACH (Fcons (Qprovide, feature)); | 3583 LOADHIST_ATTACH (Fcons (Qprovide, feature)); |
3574 return feature; | 3584 return feature; |
3575 } | 3585 } |
3576 | 3586 |
3577 DEFUN ("require", Frequire, 1, 3, 0, /* | 3587 DEFUN ("require", Frequire, 1, 3, 0, /* |
3578 If feature FEATURE is not loaded, load it from FILENAME. | 3588 Ensure that FEATURE is present in the Lisp environment. |
3579 If FEATURE is not a member of the list `features', then the feature | 3589 FEATURE is a symbol naming a collection of resources (functions, etc). |
3580 is not loaded; so load the file FILENAME. | 3590 Optional FILENAME is a library from which to load resources; it defaults to |
3581 If FILENAME is omitted, the printname of FEATURE is used as the file name. | 3591 the print name of FEATURE. |
3582 If optional third argument NOERROR is non-nil, then return nil if the file | 3592 Optional NOERROR, if non-nil, causes require to return nil rather than signal |
3583 is not found instead of signaling an error. | 3593 `file-error' if loading the library fails. |
3594 | |
3595 If feature FEATURE is present in `features', update `load-history' to reflect | |
3596 the require and return FEATURE. Otherwise, try to load it from a library. | |
3597 The normal messages at start and end of loading are suppressed. | |
3598 If the library is successfully loaded and it calls `(provide FEATURE)', add | |
3599 FEATURE to `features', update `load-history' and return FEATURE. | |
3600 If the load succeeds but FEATURE is not provided by the library, signal | |
3601 `invalid-state'. | |
3602 | |
3603 The byte-compiler treats top-level calls to `require' specially, by evaluating | |
3604 them at compile time (and then compiling them normally). Thus a library may | |
3605 request that definitions that should be inlined such as macros and defsubsts | |
3606 be loaded into its compilation environment. Achieving this in other contexts | |
3607 requires an explicit \(eval-and-compile ...\) block. | |
3584 */ | 3608 */ |
3585 (feature, filename, noerror)) | 3609 (feature, filename, noerror)) |
3586 { | 3610 { |
3587 Lisp_Object tem; | 3611 Lisp_Object tem; |
3588 CHECK_SYMBOL (feature); | 3612 CHECK_SYMBOL (feature); |