diff options
| author | Gerd Moellmann | 1999-09-04 20:11:09 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-09-04 20:11:09 +0000 |
| commit | c5092f3e57b7ce5118d99812012a23248b39b568 (patch) | |
| tree | 4fb1c3392a769679d68fc57577f3a43abc2489a1 /src | |
| parent | e884c2607b4e931b9a344102a2ca24804679d3a2 (diff) | |
| download | emacs-c5092f3e57b7ce5118d99812012a23248b39b568.tar.gz emacs-c5092f3e57b7ce5118d99812012a23248b39b568.zip | |
(Fmakehash): Exchange optional test and size arguments.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 29 |
1 files changed, 15 insertions, 14 deletions
| @@ -4311,14 +4311,14 @@ DEFUN ("copy-hash-table", Fcopy_hash_table, Scopy_hash_table, 1, 1, 0, | |||
| 4311 | 4311 | ||
| 4312 | DEFUN ("makehash", Fmakehash, Smakehash, 0, MANY, 0, | 4312 | DEFUN ("makehash", Fmakehash, Smakehash, 0, MANY, 0, |
| 4313 | "Create a new hash table.\n\ | 4313 | "Create a new hash table.\n\ |
| 4314 | Optional first argument SIZE is a hint to the implementation as\n\ | 4314 | Optional first argument TEST specifies how to compare keys in\n\ |
| 4315 | to how many elements will be put in the table. Default is 65.\n\ | ||
| 4316 | \n\ | ||
| 4317 | Optional second argument TEST specifies how to compare keys in\n\ | ||
| 4318 | the table. Predefined tests are `eq', `eql', and `equal'. Default\n\ | 4315 | the table. Predefined tests are `eq', `eql', and `equal'. Default\n\ |
| 4319 | is `eql'. New tests can be defined with `define-hash-table-test'.\n\ | 4316 | is `eql'. New tests can be defined with `define-hash-table-test'.\n\ |
| 4320 | \n\ | 4317 | \n\ |
| 4321 | Optional third argument WEAK must be one of nil, t, `key',\n\ | 4318 | Optional second argument SIZE is a hint to the implementation as\n\ |
| 4319 | to how many elements will be put in the table. Default is 65.\n\ | ||
| 4320 | \n\ | ||
| 4321 | Optional third argument WEAKNESS must be one of nil, t, `key',\n\ | ||
| 4322 | or `value'. Default is nil. Elements of weak hash tables\n\ | 4322 | or `value'. Default is nil. Elements of weak hash tables\n\ |
| 4323 | are removed when their key, value or both are otherwise unreferenced.\n\ | 4323 | are removed when their key, value or both are otherwise unreferenced.\n\ |
| 4324 | \n\ | 4324 | \n\ |
| @@ -4340,15 +4340,9 @@ Default is 0.8.") | |||
| 4340 | Lisp_Object args2[nargs + 6]; | 4340 | Lisp_Object args2[nargs + 6]; |
| 4341 | int i, j; | 4341 | int i, j; |
| 4342 | 4342 | ||
| 4343 | /* Recognize size argument. */ | ||
| 4344 | i = j = 0; | 4343 | i = j = 0; |
| 4345 | if (INTEGERP (args[i])) | 4344 | |
| 4346 | { | 4345 | /* Recognize TEST argument. */ |
| 4347 | args2[j++] = QCsize; | ||
| 4348 | args2[j++] = args[i++]; | ||
| 4349 | } | ||
| 4350 | |||
| 4351 | /* Recognize test argument. */ | ||
| 4352 | if (SYMBOLP (args[i]) | 4346 | if (SYMBOLP (args[i]) |
| 4353 | && !EQ (args[i], QCrehash_size) | 4347 | && !EQ (args[i], QCrehash_size) |
| 4354 | && !EQ (args[i], QCrehash_threshold) | 4348 | && !EQ (args[i], QCrehash_threshold) |
| @@ -4358,7 +4352,14 @@ Default is 0.8.") | |||
| 4358 | args2[j++] = args[i++]; | 4352 | args2[j++] = args[i++]; |
| 4359 | } | 4353 | } |
| 4360 | 4354 | ||
| 4361 | /* Recognize weakness argument. */ | 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. */ | ||
| 4362 | if (EQ (args[i], Qt) | 4363 | if (EQ (args[i], Qt) |
| 4363 | || NILP (args[i]) | 4364 | || NILP (args[i]) |
| 4364 | || EQ (args[i], Qkey) | 4365 | || EQ (args[i], Qkey) |