aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-07 14:48:55 +0000
committerGerd Moellmann1999-09-07 14:48:55 +0000
commita46866a03aa0bf8670529e706045b7bdc3b810d1 (patch)
tree203585f7e49fc8427819c6550ca5aa3932674921 /src
parent76a6bc491b56cf54babeb209b43a1bbe5ae6d4cf (diff)
downloademacs-a46866a03aa0bf8670529e706045b7bdc3b810d1.tar.gz
emacs-a46866a03aa0bf8670529e706045b7bdc3b810d1.zip
(Fmakehash): Take one argument, test, make all the
rest keyword arguments.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c37
1 files changed, 11 insertions, 26 deletions
diff --git a/src/fns.c b/src/fns.c
index 8cbb30b6420..8c512039788 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4315,16 +4315,12 @@ Optional first argument TEST specifies how to compare keys in\n\
4315the table. Predefined tests are `eq', `eql', and `equal'. Default\n\ 4315the table. Predefined tests are `eq', `eql', and `equal'. Default\n\
4316is `eql'. New tests can be defined with `define-hash-table-test'.\n\ 4316is `eql'. New tests can be defined with `define-hash-table-test'.\n\
4317\n\ 4317\n\
4318Optional second argument SIZE is a hint to the implementation as\n\
4319to how many elements will be put in the table. Default is 65.\n\
4320\n\
4321Optional third argument WEAKNESS must be one of nil, t, `key',\n\
4322 or `value'. Default is nil. Elements of weak hash tables\n\
4323are removed when their key, value or both are otherwise unreferenced.\n\
4324\n\
4325The rest of the optional arguments are keyword/value pairs. The\n\ 4318The rest of the optional arguments are keyword/value pairs. The\n\
4326following are recognized:\n\ 4319following are recognized:\n\
4327\n\ 4320\n\
4321:SIZE SIZE -- A hint as to how many elements will be put in the table.
4322Default is 65.\n\
4323\n\
4328:REHASH-SIZE REHASH-SIZE - Indicates how to expand the table when\n\ 4324:REHASH-SIZE REHASH-SIZE - Indicates how to expand the table when\n\
4329it fills up. If REHASH-SIZE is an integer, add that many space.\n\ 4325it fills up. If REHASH-SIZE is an integer, add that many space.\n\
4330If it is a float, it must be > 1.0, and the new size is computed by\n\ 4326If it is a float, it must be > 1.0, and the new size is computed by\n\
@@ -4332,7 +4328,12 @@ multiplying the old size with that factor. Default is 1.5.\n\
4332\n\ 4328\n\
4333:REHASH-THRESHOLD THRESHOLD -- THRESHOLD must a float > 0, and <= 1.0.\n\ 4329:REHASH-THRESHOLD THRESHOLD -- THRESHOLD must a float > 0, and <= 1.0.\n\
4334Resize the hash table when ratio of the number of entries in the table.\n\ 4330Resize the hash table when ratio of the number of entries in the table.\n\
4335Default is 0.8.") 4331Default is 0.8.\n\
4332\n\
4333:WEAKNESS WEAK -- WEAK must be one of nil, t, `key', or `value'.\n\
4334If WEAK is not nil, the table returned is a weak table. Key/value\n\
4335pairs are removed from a weak hash table when their key, value or both\n\
4336(WEAK t) are otherwise unreferenced. Default is nil.")
4336 (nargs, args) 4337 (nargs, args)
4337 int nargs; 4338 int nargs;
4338 Lisp_Object *args; 4339 Lisp_Object *args;
@@ -4346,29 +4347,13 @@ Default is 0.8.")
4346 if (SYMBOLP (args[i]) 4347 if (SYMBOLP (args[i])
4347 && !EQ (args[i], QCrehash_size) 4348 && !EQ (args[i], QCrehash_size)
4348 && !EQ (args[i], QCrehash_threshold) 4349 && !EQ (args[i], QCrehash_threshold)
4349 && !EQ (args[i], QCweakness)) 4350 && !EQ (args[i], QCweakness)
4351 && !EQ (args[i], QCsize))
4350 { 4352 {
4351 args2[j++] = QCtest; 4353 args2[j++] = QCtest;
4352 args2[j++] = args[i++]; 4354 args2[j++] = args[i++];
4353 } 4355 }
4354 4356
4355 /* Recognize SIZE argument. */
4356 if (INTEGERP (args[i]))
4357 {
4358 args2[j++] = QCsize;
4359 args2[j++] = args[i++];
4360 }
4361
4362 /* Recognize WEAKNESS argument. */
4363 if (EQ (args[i], Qt)
4364 || NILP (args[i])
4365 || EQ (args[i], Qkey)
4366 || EQ (args[i], Qvalue))
4367 {
4368 args2[j++] = QCweakness;
4369 args2[j++] = args[i++];
4370 }
4371
4372 /* Copy remaining arguments. */ 4357 /* Copy remaining arguments. */
4373 while (i < nargs) 4358 while (i < nargs)
4374 args2[j++] = args[i++]; 4359 args2[j++] = args[i++];