diff options
| author | Erik Naggum | 1996-01-09 00:31:22 +0000 |
|---|---|---|
| committer | Erik Naggum | 1996-01-09 00:31:22 +0000 |
| commit | 4acb738e57b4364f673246e424729ac195bf24dc (patch) | |
| tree | 9157904289a7640e86d979eb7fe84cf4b526b61a /src | |
| parent | e912ba094526475536b7ad86e42d8b4a429a94d6 (diff) | |
| download | emacs-4acb738e57b4364f673246e424729ac195bf24dc.tar.gz emacs-4acb738e57b4364f673246e424729ac195bf24dc.zip | |
(Fdocumentation, Fdocumentation_property, Fsubstitute_command_keys):
Harmonize arguments with documentation.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc.c | 46 |
1 files changed, 23 insertions, 23 deletions
| @@ -263,7 +263,7 @@ read_doc_string (filepos) | |||
| 263 | 263 | ||
| 264 | DEFUN ("documentation", Fdocumentation, Sdocumentation, 1, 2, 0, | 264 | DEFUN ("documentation", Fdocumentation, Sdocumentation, 1, 2, 0, |
| 265 | "Return the documentation string of FUNCTION.\n\ | 265 | "Return the documentation string of FUNCTION.\n\ |
| 266 | Unless a non-nil second argument is given, the\n\ | 266 | Unless a non-nil second argument RAW is given, the\n\ |
| 267 | string is passed through `substitute-command-keys'.") | 267 | string is passed through `substitute-command-keys'.") |
| 268 | (function, raw) | 268 | (function, raw) |
| 269 | Lisp_Object function, raw; | 269 | Lisp_Object function, raw; |
| @@ -350,14 +350,14 @@ DEFUN ("documentation-property", Fdocumentation_property, Sdocumentation_propert | |||
| 350 | "Return the documentation string that is SYMBOL's PROP property.\n\ | 350 | "Return the documentation string that is SYMBOL's PROP property.\n\ |
| 351 | This is like `get', but it can refer to strings stored in the\n\ | 351 | This is like `get', but it can refer to strings stored in the\n\ |
| 352 | `etc/DOC' file; and if the value is a string, it is passed through\n\ | 352 | `etc/DOC' file; and if the value is a string, it is passed through\n\ |
| 353 | `substitute-command-keys'. A non-nil third argument avoids this\n\ | 353 | `substitute-command-keys'. A non-nil third argument RAW avoids this\n\ |
| 354 | translation.") | 354 | translation.") |
| 355 | (sym, prop, raw) | 355 | (symbol, prop, raw) |
| 356 | Lisp_Object sym, prop, raw; | 356 | Lisp_Object symbol, prop, raw; |
| 357 | { | 357 | { |
| 358 | register Lisp_Object tem; | 358 | register Lisp_Object tem; |
| 359 | 359 | ||
| 360 | tem = Fget (sym, prop); | 360 | tem = Fget (symbol, prop); |
| 361 | if (INTEGERP (tem)) | 361 | if (INTEGERP (tem)) |
| 362 | tem = get_doc_string (XINT (tem) > 0 ? tem : make_number (- XINT (tem))); | 362 | tem = get_doc_string (XINT (tem) > 0 ? tem : make_number (- XINT (tem))); |
| 363 | else if (CONSP (tem)) | 363 | else if (CONSP (tem)) |
| @@ -528,8 +528,8 @@ Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR\n\ | |||
| 528 | as the keymap for future \\=\\[COMMAND] substrings.\n\ | 528 | as the keymap for future \\=\\[COMMAND] substrings.\n\ |
| 529 | \\=\\= quotes the following character and is discarded;\n\ | 529 | \\=\\= quotes the following character and is discarded;\n\ |
| 530 | thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output.") | 530 | thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output.") |
| 531 | (str) | 531 | (string) |
| 532 | Lisp_Object str; | 532 | Lisp_Object string; |
| 533 | { | 533 | { |
| 534 | unsigned char *buf; | 534 | unsigned char *buf; |
| 535 | int changed = 0; | 535 | int changed = 0; |
| @@ -545,28 +545,28 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int | |||
| 545 | Lisp_Object name; | 545 | Lisp_Object name; |
| 546 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 546 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 547 | 547 | ||
| 548 | if (NILP (str)) | 548 | if (NILP (string)) |
| 549 | return Qnil; | 549 | return Qnil; |
| 550 | 550 | ||
| 551 | CHECK_STRING (str, 0); | 551 | CHECK_STRING (string, 0); |
| 552 | tem = Qnil; | 552 | tem = Qnil; |
| 553 | keymap = Qnil; | 553 | keymap = Qnil; |
| 554 | name = Qnil; | 554 | name = Qnil; |
| 555 | GCPRO4 (str, tem, keymap, name); | 555 | GCPRO4 (string, tem, keymap, name); |
| 556 | 556 | ||
| 557 | /* KEYMAP is either nil (which means search all the active keymaps) | 557 | /* KEYMAP is either nil (which means search all the active keymaps) |
| 558 | or a specified local map (which means search just that and the | 558 | or a specified local map (which means search just that and the |
| 559 | global map). If non-nil, it might come from Voverriding_local_map, | 559 | global map). If non-nil, it might come from Voverriding_local_map, |
| 560 | or from a \\<mapname> construct in STR itself.. */ | 560 | or from a \\<mapname> construct in STRING itself.. */ |
| 561 | keymap = current_kboard->Voverriding_terminal_local_map; | 561 | keymap = current_kboard->Voverriding_terminal_local_map; |
| 562 | if (NILP (keymap)) | 562 | if (NILP (keymap)) |
| 563 | keymap = Voverriding_local_map; | 563 | keymap = Voverriding_local_map; |
| 564 | 564 | ||
| 565 | bsize = XSTRING (str)->size; | 565 | bsize = XSTRING (string)->size; |
| 566 | bufp = buf = (unsigned char *) xmalloc (bsize); | 566 | bufp = buf = (unsigned char *) xmalloc (bsize); |
| 567 | 567 | ||
| 568 | strp = (unsigned char *) XSTRING (str)->data; | 568 | strp = (unsigned char *) XSTRING (string)->data; |
| 569 | while (strp < (unsigned char *) XSTRING (str)->data + XSTRING (str)->size) | 569 | while (strp < (unsigned char *) XSTRING (string)->data + XSTRING (string)->size) |
| 570 | { | 570 | { |
| 571 | if (strp[0] == '\\' && strp[1] == '=') | 571 | if (strp[0] == '\\' && strp[1] == '=') |
| 572 | { | 572 | { |
| @@ -584,15 +584,15 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int | |||
| 584 | strp += 2; /* skip \[ */ | 584 | strp += 2; /* skip \[ */ |
| 585 | start = strp; | 585 | start = strp; |
| 586 | 586 | ||
| 587 | while ((strp - (unsigned char *) XSTRING (str)->data | 587 | while ((strp - (unsigned char *) XSTRING (string)->data |
| 588 | < XSTRING (str)->size) | 588 | < XSTRING (string)->size) |
| 589 | && *strp != ']') | 589 | && *strp != ']') |
| 590 | strp++; | 590 | strp++; |
| 591 | length = strp - start; | 591 | length = strp - start; |
| 592 | strp++; /* skip ] */ | 592 | strp++; /* skip ] */ |
| 593 | 593 | ||
| 594 | /* Save STRP in IDX. */ | 594 | /* Save STRP in IDX. */ |
| 595 | idx = strp - (unsigned char *) XSTRING (str)->data; | 595 | idx = strp - (unsigned char *) XSTRING (string)->data; |
| 596 | tem = Fintern (make_string (start, length), Qnil); | 596 | tem = Fintern (make_string (start, length), Qnil); |
| 597 | tem = Fwhere_is_internal (tem, keymap, Qt, Qnil); | 597 | tem = Fwhere_is_internal (tem, keymap, Qt, Qnil); |
| 598 | 598 | ||
| @@ -631,15 +631,15 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int | |||
| 631 | strp += 2; /* skip \{ or \< */ | 631 | strp += 2; /* skip \{ or \< */ |
| 632 | start = strp; | 632 | start = strp; |
| 633 | 633 | ||
| 634 | while ((strp - (unsigned char *) XSTRING (str)->data | 634 | while ((strp - (unsigned char *) XSTRING (string)->data |
| 635 | < XSTRING (str)->size) | 635 | < XSTRING (string)->size) |
| 636 | && *strp != '}' && *strp != '>') | 636 | && *strp != '}' && *strp != '>') |
| 637 | strp++; | 637 | strp++; |
| 638 | length = strp - start; | 638 | length = strp - start; |
| 639 | strp++; /* skip } or > */ | 639 | strp++; /* skip } or > */ |
| 640 | 640 | ||
| 641 | /* Save STRP in IDX. */ | 641 | /* Save STRP in IDX. */ |
| 642 | idx = strp - (unsigned char *) XSTRING (str)->data; | 642 | idx = strp - (unsigned char *) XSTRING (string)->data; |
| 643 | 643 | ||
| 644 | /* Get the value of the keymap in TEM, or nil if undefined. | 644 | /* Get the value of the keymap in TEM, or nil if undefined. |
| 645 | Do this while still in the user's current buffer | 645 | Do this while still in the user's current buffer |
| @@ -682,8 +682,8 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int | |||
| 682 | buf = new; | 682 | buf = new; |
| 683 | bcopy (start, bufp, length); | 683 | bcopy (start, bufp, length); |
| 684 | bufp += length; | 684 | bufp += length; |
| 685 | /* Check STR again in case gc relocated it. */ | 685 | /* Check STRING again in case gc relocated it. */ |
| 686 | strp = (unsigned char *) XSTRING (str)->data + idx; | 686 | strp = (unsigned char *) XSTRING (string)->data + idx; |
| 687 | } | 687 | } |
| 688 | else /* just copy other chars */ | 688 | else /* just copy other chars */ |
| 689 | *bufp++ = *strp++; | 689 | *bufp++ = *strp++; |
| @@ -692,7 +692,7 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int | |||
| 692 | if (changed) /* don't bother if nothing substituted */ | 692 | if (changed) /* don't bother if nothing substituted */ |
| 693 | tem = make_string (buf, bufp - buf); | 693 | tem = make_string (buf, bufp - buf); |
| 694 | else | 694 | else |
| 695 | tem = str; | 695 | tem = string; |
| 696 | xfree (buf); | 696 | xfree (buf); |
| 697 | RETURN_UNGCPRO (tem); | 697 | RETURN_UNGCPRO (tem); |
| 698 | } | 698 | } |