diff 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
line wrap: on
line diff
--- a/src/fns.c	Sat Dec 26 00:20:27 2009 -0600
+++ b/src/fns.c	Sat Dec 26 21:18:49 2009 -0600
@@ -129,7 +129,7 @@
 };
 
 
-DEFINE_SIZABLE_LISP_OBJECT ("bit-vector", bit_vector,
+DEFINE_DUMPABLE_SIZABLE_LISP_OBJECT ("bit-vector", bit_vector,
 				       mark_bit_vector,
 				       print_bit_vector, 0,
 				       bit_vector_equal,
@@ -502,6 +502,8 @@
 Each argument may be a list, vector, bit vector, or string.
 The last argument is not copied, just used as the tail of the new list.
 Also see: `nconc'.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -517,6 +519,8 @@
 as arguments.  Old code that relies on, for example, (concat "foo" 50)
 returning "foo50" will fail.  To fix such code, either apply
 `int-to-string' to the integer argument, or use `format'.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -527,6 +531,8 @@
 Concatenate all the arguments and make the result a vector.
 The result is a vector whose elements are the elements of all the arguments.
 Each argument may be a list, vector, bit vector, or string.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -537,6 +543,8 @@
 Concatenate all the arguments and make the result a bit vector.
 The result is a bit vector whose elements are the elements of all the
 arguments.  Each argument may be a list, vector, bit vector, or string.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -3063,6 +3071,8 @@
 If the first argument is nil, there is no way to modify it by side
 effect; therefore, write `(setq foo (nconc foo list))' to be sure of
 changing the value of `foo'.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -3575,12 +3585,26 @@
 }
 
 DEFUN ("require", Frequire, 1, 3, 0, /*
-If feature FEATURE is not loaded, load it from FILENAME.
-If FEATURE is not a member of the list `features', then the feature
-is not loaded; so load the file FILENAME.
-If FILENAME is omitted, the printname of FEATURE is used as the file name.
-If optional third argument NOERROR is non-nil, then return nil if the file
-is not found instead of signaling an error.
+Ensure that FEATURE is present in the Lisp environment.
+FEATURE is a symbol naming a collection of resources (functions, etc).
+Optional FILENAME is a library from which to load resources; it defaults to
+the print name of FEATURE.
+Optional NOERROR, if non-nil, causes require to return nil rather than signal
+`file-error' if loading the library fails.
+
+If feature FEATURE is present in `features', update `load-history' to reflect
+the require and return FEATURE.  Otherwise, try to load it from a library.
+The normal messages at start and end of loading are suppressed.
+If the library is successfully loaded and it calls `(provide FEATURE)', add
+FEATURE to `features', update `load-history' and return FEATURE.
+If the load succeeds but FEATURE is not provided by the library, signal
+`invalid-state'.
+
+The byte-compiler treats top-level calls to `require' specially, by evaluating
+them at compile time (and then compiling them normally).  Thus a library may
+request that definitions that should be inlined such as macros and defsubsts
+be loaded into its compilation environment.  Achieving this in other contexts
+requires an explicit \(eval-and-compile ...\) block.
 */
        (feature, filename, noerror))
 {