diff options
| author | Pavel Janík | 2001-10-15 15:07:49 +0000 |
|---|---|---|
| committer | Pavel Janík | 2001-10-15 15:07:49 +0000 |
| commit | a1f17501163cde84405d0f3ceed4c206890d191a (patch) | |
| tree | b0adb3f214e56ccfdba831e331f7d86431d1b029 /src | |
| parent | e2ba787b86469253337f6360594d5dbbcc154dc8 (diff) | |
| download | emacs-a1f17501163cde84405d0f3ceed4c206890d191a.tar.gz emacs-a1f17501163cde84405d0f3ceed4c206890d191a.zip | |
Put doc strings in comments.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/editfns.c | 1045 | ||||
| -rw-r--r-- | src/minibuf.c | 503 |
3 files changed, 785 insertions, 767 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 10518e2fd7e..0bd77add332 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -4,7 +4,9 @@ | |||
| 4 | get-buffer-process): Do not confuse make-docfile with doc strings | 4 | get-buffer-process): Do not confuse make-docfile with doc strings |
| 5 | in comment. | 5 | in comment. |
| 6 | 6 | ||
| 7 | * editfns.c (Fchar_to_string): Make doc string consistent with arguments. | 7 | * editfns.c (Fchar_to_string): Make doc string consistent with |
| 8 | arguments. | ||
| 9 | Put doc strings in comments. | ||
| 8 | 10 | ||
| 9 | * abbrev.c, minibuf.c: Put doc strings in comments. | 11 | * abbrev.c, minibuf.c: Put doc strings in comments. |
| 10 | 12 | ||
diff --git a/src/editfns.c b/src/editfns.c index 5f2c8739915..af2839f4f0a 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 34 | #include <unistd.h> | 34 | #include <unistd.h> |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | #define DOC_STRINGS_IN_COMMENTS | ||
| 37 | #include "lisp.h" | 38 | #include "lisp.h" |
| 38 | #include "intervals.h" | 39 | #include "intervals.h" |
| 39 | #include "buffer.h" | 40 | #include "buffer.h" |
| @@ -164,8 +165,8 @@ init_editfns () | |||
| 164 | } | 165 | } |
| 165 | 166 | ||
| 166 | DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, | 167 | DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, |
| 167 | "Convert arg CHARACTER to a string containing that character.") | 168 | /* Convert arg CHARACTER to a string containing that character. */ |
| 168 | (character) | 169 | (character)) |
| 169 | Lisp_Object character; | 170 | Lisp_Object character; |
| 170 | { | 171 | { |
| 171 | int len; | 172 | int len; |
| @@ -180,9 +181,9 @@ DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, | |||
| 180 | } | 181 | } |
| 181 | 182 | ||
| 182 | DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, | 183 | DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, |
| 183 | "Convert arg STRING to a character, the first character of that string.\n\ | 184 | /* Convert arg STRING to a character, the first character of that string. |
| 184 | A multibyte character is handled correctly.") | 185 | A multibyte character is handled correctly. */ |
| 185 | (string) | 186 | (string)) |
| 186 | register Lisp_Object string; | 187 | register Lisp_Object string; |
| 187 | { | 188 | { |
| 188 | register Lisp_Object val; | 189 | register Lisp_Object val; |
| @@ -212,9 +213,9 @@ buildmark (charpos, bytepos) | |||
| 212 | } | 213 | } |
| 213 | 214 | ||
| 214 | DEFUN ("point", Fpoint, Spoint, 0, 0, 0, | 215 | DEFUN ("point", Fpoint, Spoint, 0, 0, 0, |
| 215 | "Return value of point, as an integer.\n\ | 216 | /* Return value of point, as an integer. |
| 216 | Beginning of buffer is position (point-min)") | 217 | Beginning of buffer is position (point-min). */ |
| 217 | () | 218 | ()) |
| 218 | { | 219 | { |
| 219 | Lisp_Object temp; | 220 | Lisp_Object temp; |
| 220 | XSETFASTINT (temp, PT); | 221 | XSETFASTINT (temp, PT); |
| @@ -222,8 +223,8 @@ Beginning of buffer is position (point-min)") | |||
| 222 | } | 223 | } |
| 223 | 224 | ||
| 224 | DEFUN ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, | 225 | DEFUN ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, |
| 225 | "Return value of point, as a marker object.") | 226 | /* Return value of point, as a marker object. */ |
| 226 | () | 227 | ()) |
| 227 | { | 228 | { |
| 228 | return buildmark (PT, PT_BYTE); | 229 | return buildmark (PT, PT_BYTE); |
| 229 | } | 230 | } |
| @@ -241,12 +242,12 @@ clip_to_bounds (lower, num, upper) | |||
| 241 | } | 242 | } |
| 242 | 243 | ||
| 243 | DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", | 244 | DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", |
| 244 | "Set point to POSITION, a number or marker.\n\ | 245 | /* Set point to POSITION, a number or marker. |
| 245 | Beginning of buffer is position (point-min), end is (point-max).\n\ | 246 | Beginning of buffer is position (point-min), end is (point-max). |
| 246 | If the position is in the middle of a multibyte form,\n\ | 247 | If the position is in the middle of a multibyte form, |
| 247 | the actual point is set at the head of the multibyte form\n\ | 248 | the actual point is set at the head of the multibyte form |
| 248 | except in the case that `enable-multibyte-characters' is nil.") | 249 | except in the case that `enable-multibyte-characters' is nil. */ |
| 249 | (position) | 250 | (position)) |
| 250 | register Lisp_Object position; | 251 | register Lisp_Object position; |
| 251 | { | 252 | { |
| 252 | int pos; | 253 | int pos; |
| @@ -299,24 +300,24 @@ region_limit (beginningp) | |||
| 299 | } | 300 | } |
| 300 | 301 | ||
| 301 | DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, | 302 | DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, |
| 302 | "Return position of beginning of region, as an integer.") | 303 | /* Return position of beginning of region, as an integer. */ |
| 303 | () | 304 | ()) |
| 304 | { | 305 | { |
| 305 | return region_limit (1); | 306 | return region_limit (1); |
| 306 | } | 307 | } |
| 307 | 308 | ||
| 308 | DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0, | 309 | DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0, |
| 309 | "Return position of end of region, as an integer.") | 310 | /* Return position of end of region, as an integer. */ |
| 310 | () | 311 | ()) |
| 311 | { | 312 | { |
| 312 | return region_limit (0); | 313 | return region_limit (0); |
| 313 | } | 314 | } |
| 314 | 315 | ||
| 315 | DEFUN ("mark-marker", Fmark_marker, Smark_marker, 0, 0, 0, | 316 | DEFUN ("mark-marker", Fmark_marker, Smark_marker, 0, 0, 0, |
| 316 | "Return this buffer's mark, as a marker object.\n\ | 317 | /* Return this buffer's mark, as a marker object. |
| 317 | Watch out! Moving this marker changes the mark position.\n\ | 318 | Watch out! Moving this marker changes the mark position. |
| 318 | If you set the marker not to point anywhere, the buffer will have no mark.") | 319 | If you set the marker not to point anywhere, the buffer will have no mark. */ |
| 319 | () | 320 | ()) |
| 320 | { | 321 | { |
| 321 | return current_buffer->mark; | 322 | return current_buffer->mark; |
| 322 | } | 323 | } |
| @@ -556,10 +557,10 @@ find_field (pos, merge_at_boundary, beg, end) | |||
| 556 | 557 | ||
| 557 | 558 | ||
| 558 | DEFUN ("delete-field", Fdelete_field, Sdelete_field, 0, 1, 0, | 559 | DEFUN ("delete-field", Fdelete_field, Sdelete_field, 0, 1, 0, |
| 559 | "Delete the field surrounding POS.\n\ | 560 | /* Delete the field surrounding POS. |
| 560 | A field is a region of text with the same `field' property.\n\ | 561 | A field is a region of text with the same `field' property. |
| 561 | If POS is nil, the value of point is used for POS.") | 562 | If POS is nil, the value of point is used for POS. */ |
| 562 | (pos) | 563 | (pos)) |
| 563 | Lisp_Object pos; | 564 | Lisp_Object pos; |
| 564 | { | 565 | { |
| 565 | int beg, end; | 566 | int beg, end; |
| @@ -570,10 +571,10 @@ If POS is nil, the value of point is used for POS.") | |||
| 570 | } | 571 | } |
| 571 | 572 | ||
| 572 | DEFUN ("field-string", Ffield_string, Sfield_string, 0, 1, 0, | 573 | DEFUN ("field-string", Ffield_string, Sfield_string, 0, 1, 0, |
| 573 | "Return the contents of the field surrounding POS as a string.\n\ | 574 | /* Return the contents of the field surrounding POS as a string. |
| 574 | A field is a region of text with the same `field' property.\n\ | 575 | A field is a region of text with the same `field' property. |
| 575 | If POS is nil, the value of point is used for POS.") | 576 | If POS is nil, the value of point is used for POS. */ |
| 576 | (pos) | 577 | (pos)) |
| 577 | Lisp_Object pos; | 578 | Lisp_Object pos; |
| 578 | { | 579 | { |
| 579 | int beg, end; | 580 | int beg, end; |
| @@ -582,10 +583,10 @@ If POS is nil, the value of point is used for POS.") | |||
| 582 | } | 583 | } |
| 583 | 584 | ||
| 584 | DEFUN ("field-string-no-properties", Ffield_string_no_properties, Sfield_string_no_properties, 0, 1, 0, | 585 | DEFUN ("field-string-no-properties", Ffield_string_no_properties, Sfield_string_no_properties, 0, 1, 0, |
| 585 | "Return the contents of the field around POS, without text-properties.\n\ | 586 | /* Return the contents of the field around POS, without text-properties. |
| 586 | A field is a region of text with the same `field' property.\n\ | 587 | A field is a region of text with the same `field' property. |
| 587 | If POS is nil, the value of point is used for POS.") | 588 | If POS is nil, the value of point is used for POS. */ |
| 588 | (pos) | 589 | (pos)) |
| 589 | Lisp_Object pos; | 590 | Lisp_Object pos; |
| 590 | { | 591 | { |
| 591 | int beg, end; | 592 | int beg, end; |
| @@ -594,12 +595,12 @@ If POS is nil, the value of point is used for POS.") | |||
| 594 | } | 595 | } |
| 595 | 596 | ||
| 596 | DEFUN ("field-beginning", Ffield_beginning, Sfield_beginning, 0, 2, 0, | 597 | DEFUN ("field-beginning", Ffield_beginning, Sfield_beginning, 0, 2, 0, |
| 597 | "Return the beginning of the field surrounding POS.\n\ | 598 | /* Return the beginning of the field surrounding POS. |
| 598 | A field is a region of text with the same `field' property.\n\ | 599 | A field is a region of text with the same `field' property. |
| 599 | If POS is nil, the value of point is used for POS.\n\ | 600 | If POS is nil, the value of point is used for POS. |
| 600 | If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its\n\ | 601 | If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its |
| 601 | field, then the beginning of the *previous* field is returned.") | 602 | field, then the beginning of the *previous* field is returned. */ |
| 602 | (pos, escape_from_edge) | 603 | (pos, escape_from_edge)) |
| 603 | Lisp_Object pos, escape_from_edge; | 604 | Lisp_Object pos, escape_from_edge; |
| 604 | { | 605 | { |
| 605 | int beg; | 606 | int beg; |
| @@ -608,12 +609,12 @@ field, then the beginning of the *previous* field is returned.") | |||
| 608 | } | 609 | } |
| 609 | 610 | ||
| 610 | DEFUN ("field-end", Ffield_end, Sfield_end, 0, 2, 0, | 611 | DEFUN ("field-end", Ffield_end, Sfield_end, 0, 2, 0, |
| 611 | "Return the end of the field surrounding POS.\n\ | 612 | /* Return the end of the field surrounding POS. |
| 612 | A field is a region of text with the same `field' property.\n\ | 613 | A field is a region of text with the same `field' property. |
| 613 | If POS is nil, the value of point is used for POS.\n\ | 614 | If POS is nil, the value of point is used for POS. |
| 614 | If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field,\n\ | 615 | If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field, |
| 615 | then the end of the *following* field is returned.") | 616 | then the end of the *following* field is returned. */ |
| 616 | (pos, escape_from_edge) | 617 | (pos, escape_from_edge)) |
| 617 | Lisp_Object pos, escape_from_edge; | 618 | Lisp_Object pos, escape_from_edge; |
| 618 | { | 619 | { |
| 619 | int end; | 620 | int end; |
| @@ -622,33 +623,33 @@ then the end of the *following* field is returned.") | |||
| 622 | } | 623 | } |
| 623 | 624 | ||
| 624 | DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, | 625 | DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, |
| 625 | "Return the position closest to NEW-POS that is in the same field as OLD-POS.\n\ | 626 | /* Return the position closest to NEW-POS that is in the same field as OLD-POS. |
| 626 | \n\ | 627 | |
| 627 | A field is a region of text with the same `field' property.\n\ | 628 | A field is a region of text with the same `field' property. |
| 628 | If NEW-POS is nil, then the current point is used instead, and set to the\n\ | 629 | If NEW-POS is nil, then the current point is used instead, and set to the |
| 629 | constrained position if that is different.\n\ | 630 | constrained position if that is different. |
| 630 | \n\ | 631 | |
| 631 | If OLD-POS is at the boundary of two fields, then the allowable\n\ | 632 | If OLD-POS is at the boundary of two fields, then the allowable |
| 632 | positions for NEW-POS depends on the value of the optional argument\n\ | 633 | positions for NEW-POS depends on the value of the optional argument |
| 633 | ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is\n\ | 634 | ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is |
| 634 | constrained to the field that has the same `field' char-property\n\ | 635 | constrained to the field that has the same `field' char-property |
| 635 | as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE\n\ | 636 | as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE |
| 636 | is non-nil, NEW-POS is constrained to the union of the two adjacent\n\ | 637 | is non-nil, NEW-POS is constrained to the union of the two adjacent |
| 637 | fields. Additionally, if two fields are separated by another field with\n\ | 638 | fields. Additionally, if two fields are separated by another field with |
| 638 | the special value `boundary', then any point within this special field is\n\ | 639 | the special value `boundary', then any point within this special field is |
| 639 | also considered to be `on the boundary'.\n\ | 640 | also considered to be `on the boundary'. |
| 640 | \n\ | 641 | |
| 641 | If the optional argument ONLY-IN-LINE is non-nil and constraining\n\ | 642 | If the optional argument ONLY-IN-LINE is non-nil and constraining |
| 642 | NEW-POS would move it to a different line, NEW-POS is returned\n\ | 643 | NEW-POS would move it to a different line, NEW-POS is returned |
| 643 | unconstrained. This useful for commands that move by line, like\n\ | 644 | unconstrained. This useful for commands that move by line, like |
| 644 | \\[next-line] or \\[beginning-of-line], which should generally respect field boundaries\n\ | 645 | \\[next-line] or \\[beginning-of-line], which should generally respect field boundaries |
| 645 | only in the case where they can still move to the right line.\n\ | 646 | only in the case where they can still move to the right line. |
| 646 | \n\ | 647 | |
| 647 | If the optional argument INHIBIT-CAPTURE-PROPERTY is non-nil, and OLD-POS has\n\ | 648 | If the optional argument INHIBIT-CAPTURE-PROPERTY is non-nil, and OLD-POS has |
| 648 | a non-nil property of that name, then any field boundaries are ignored.\n\ | 649 | a non-nil property of that name, then any field boundaries are ignored. |
| 649 | \n\ | 650 | |
| 650 | Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil.") | 651 | Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */ |
| 651 | (new_pos, old_pos, escape_from_edge, only_in_line, inhibit_capture_property) | 652 | (new_pos, old_pos, escape_from_edge, only_in_line, inhibit_capture_property)) |
| 652 | Lisp_Object new_pos, old_pos; | 653 | Lisp_Object new_pos, old_pos; |
| 653 | Lisp_Object escape_from_edge, only_in_line, inhibit_capture_property; | 654 | Lisp_Object escape_from_edge, only_in_line, inhibit_capture_property; |
| 654 | { | 655 | { |
| @@ -715,16 +716,16 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil.") | |||
| 715 | 716 | ||
| 716 | DEFUN ("line-beginning-position", Fline_beginning_position, Sline_beginning_position, | 717 | DEFUN ("line-beginning-position", Fline_beginning_position, Sline_beginning_position, |
| 717 | 0, 1, 0, | 718 | 0, 1, 0, |
| 718 | "Return the character position of the first character on the current line.\n\ | 719 | /* Return the character position of the first character on the current line. |
| 719 | With argument N not nil or 1, move forward N - 1 lines first.\n\ | 720 | With argument N not nil or 1, move forward N - 1 lines first. |
| 720 | If scan reaches end of buffer, return that position.\n\ | 721 | If scan reaches end of buffer, return that position. |
| 721 | The scan does not cross a field boundary unless it would move\n\ | 722 | The scan does not cross a field boundary unless it would move |
| 722 | beyond there to a different line. Field boundaries are not noticed if\n\ | 723 | beyond there to a different line. Field boundaries are not noticed if |
| 723 | `inhibit-field-text-motion' is non-nil. .And if N is nil or 1,\n\ | 724 | `inhibit-field-text-motion' is non-nil. And if N is nil or 1, |
| 724 | and scan starts at a field boundary, the scan stops as soon as it starts.\n\ | 725 | and scan starts at a field boundary, the scan stops as soon as it starts. |
| 725 | \n\ | 726 | |
| 726 | This function does not move point.") | 727 | This function does not move point. */ |
| 727 | (n) | 728 | (n)) |
| 728 | Lisp_Object n; | 729 | Lisp_Object n; |
| 729 | { | 730 | { |
| 730 | int orig, orig_byte, end; | 731 | int orig, orig_byte, end; |
| @@ -749,11 +750,11 @@ This function does not move point.") | |||
| 749 | 750 | ||
| 750 | DEFUN ("line-end-position", Fline_end_position, Sline_end_position, | 751 | DEFUN ("line-end-position", Fline_end_position, Sline_end_position, |
| 751 | 0, 1, 0, | 752 | 0, 1, 0, |
| 752 | "Return the character position of the last character on the current line.\n\ | 753 | /* Return the character position of the last character on the current line. |
| 753 | With argument N not nil or 1, move forward N - 1 lines first.\n\ | 754 | With argument N not nil or 1, move forward N - 1 lines first. |
| 754 | If scan reaches end of buffer, return that position.\n\ | 755 | If scan reaches end of buffer, return that position. |
| 755 | This function does not move point.") | 756 | This function does not move point. */ |
| 756 | (n) | 757 | (n)) |
| 757 | Lisp_Object n; | 758 | Lisp_Object n; |
| 758 | { | 759 | { |
| 759 | int end_pos; | 760 | int end_pos; |
| @@ -870,17 +871,17 @@ save_excursion_restore (info) | |||
| 870 | } | 871 | } |
| 871 | 872 | ||
| 872 | DEFUN ("save-excursion", Fsave_excursion, Ssave_excursion, 0, UNEVALLED, 0, | 873 | DEFUN ("save-excursion", Fsave_excursion, Ssave_excursion, 0, UNEVALLED, 0, |
| 873 | "Save point, mark, and current buffer; execute BODY; restore those things.\n\ | 874 | /* Save point, mark, and current buffer; execute BODY; restore those things. |
| 874 | Executes BODY just like `progn'.\n\ | 875 | Executes BODY just like `progn'. |
| 875 | The values of point, mark and the current buffer are restored\n\ | 876 | The values of point, mark and the current buffer are restored |
| 876 | even in case of abnormal exit (throw or error).\n\ | 877 | even in case of abnormal exit (throw or error). |
| 877 | The state of activation of the mark is also restored.\n\ | 878 | The state of activation of the mark is also restored. |
| 878 | \n\ | 879 | |
| 879 | This construct does not save `deactivate-mark', and therefore\n\ | 880 | This construct does not save `deactivate-mark', and therefore |
| 880 | functions that change the buffer will still cause deactivation\n\ | 881 | functions that change the buffer will still cause deactivation |
| 881 | of the mark at the end of the command. To prevent that, bind\n\ | 882 | of the mark at the end of the command. To prevent that, bind |
| 882 | `deactivate-mark' with `let'.") | 883 | `deactivate-mark' with `let'. */ |
| 883 | (args) | 884 | (args)) |
| 884 | Lisp_Object args; | 885 | Lisp_Object args; |
| 885 | { | 886 | { |
| 886 | register Lisp_Object val; | 887 | register Lisp_Object val; |
| @@ -893,9 +894,9 @@ of the mark at the end of the command. To prevent that, bind\n\ | |||
| 893 | } | 894 | } |
| 894 | 895 | ||
| 895 | DEFUN ("save-current-buffer", Fsave_current_buffer, Ssave_current_buffer, 0, UNEVALLED, 0, | 896 | DEFUN ("save-current-buffer", Fsave_current_buffer, Ssave_current_buffer, 0, UNEVALLED, 0, |
| 896 | "Save the current buffer; execute BODY; restore the current buffer.\n\ | 897 | /* Save the current buffer; execute BODY; restore the current buffer. |
| 897 | Executes BODY just like `progn'.") | 898 | Executes BODY just like `progn'. */ |
| 898 | (args) | 899 | (args)) |
| 899 | Lisp_Object args; | 900 | Lisp_Object args; |
| 900 | { | 901 | { |
| 901 | Lisp_Object val; | 902 | Lisp_Object val; |
| @@ -908,9 +909,9 @@ Executes BODY just like `progn'.") | |||
| 908 | } | 909 | } |
| 909 | 910 | ||
| 910 | DEFUN ("buffer-size", Fbufsize, Sbufsize, 0, 1, 0, | 911 | DEFUN ("buffer-size", Fbufsize, Sbufsize, 0, 1, 0, |
| 911 | "Return the number of characters in the current buffer.\n\ | 912 | /* Return the number of characters in the current buffer. |
| 912 | If BUFFER, return the number of characters in that buffer instead.") | 913 | If BUFFER, return the number of characters in that buffer instead. */ |
| 913 | (buffer) | 914 | (buffer)) |
| 914 | Lisp_Object buffer; | 915 | Lisp_Object buffer; |
| 915 | { | 916 | { |
| 916 | if (NILP (buffer)) | 917 | if (NILP (buffer)) |
| @@ -924,9 +925,9 @@ If BUFFER, return the number of characters in that buffer instead.") | |||
| 924 | } | 925 | } |
| 925 | 926 | ||
| 926 | DEFUN ("point-min", Fpoint_min, Spoint_min, 0, 0, 0, | 927 | DEFUN ("point-min", Fpoint_min, Spoint_min, 0, 0, 0, |
| 927 | "Return the minimum permissible value of point in the current buffer.\n\ | 928 | /* Return the minimum permissible value of point in the current buffer. |
| 928 | This is 1, unless narrowing (a buffer restriction) is in effect.") | 929 | This is 1, unless narrowing (a buffer restriction) is in effect. */ |
| 929 | () | 930 | ()) |
| 930 | { | 931 | { |
| 931 | Lisp_Object temp; | 932 | Lisp_Object temp; |
| 932 | XSETFASTINT (temp, BEGV); | 933 | XSETFASTINT (temp, BEGV); |
| @@ -934,18 +935,18 @@ This is 1, unless narrowing (a buffer restriction) is in effect.") | |||
| 934 | } | 935 | } |
| 935 | 936 | ||
| 936 | DEFUN ("point-min-marker", Fpoint_min_marker, Spoint_min_marker, 0, 0, 0, | 937 | DEFUN ("point-min-marker", Fpoint_min_marker, Spoint_min_marker, 0, 0, 0, |
| 937 | "Return a marker to the minimum permissible value of point in this buffer.\n\ | 938 | /* Return a marker to the minimum permissible value of point in this buffer. |
| 938 | This is the beginning, unless narrowing (a buffer restriction) is in effect.") | 939 | This is the beginning, unless narrowing (a buffer restriction) is in effect. */ |
| 939 | () | 940 | ()) |
| 940 | { | 941 | { |
| 941 | return buildmark (BEGV, BEGV_BYTE); | 942 | return buildmark (BEGV, BEGV_BYTE); |
| 942 | } | 943 | } |
| 943 | 944 | ||
| 944 | DEFUN ("point-max", Fpoint_max, Spoint_max, 0, 0, 0, | 945 | DEFUN ("point-max", Fpoint_max, Spoint_max, 0, 0, 0, |
| 945 | "Return the maximum permissible value of point in the current buffer.\n\ | 946 | /* Return the maximum permissible value of point in the current buffer. |
| 946 | This is (1+ (buffer-size)), unless narrowing (a buffer restriction)\n\ | 947 | This is (1+ (buffer-size)), unless narrowing (a buffer restriction) |
| 947 | is in effect, in which case it is less.") | 948 | is in effect, in which case it is less. */ |
| 948 | () | 949 | ()) |
| 949 | { | 950 | { |
| 950 | Lisp_Object temp; | 951 | Lisp_Object temp; |
| 951 | XSETFASTINT (temp, ZV); | 952 | XSETFASTINT (temp, ZV); |
| @@ -953,18 +954,18 @@ is in effect, in which case it is less.") | |||
| 953 | } | 954 | } |
| 954 | 955 | ||
| 955 | DEFUN ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0, | 956 | DEFUN ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0, |
| 956 | "Return a marker to the maximum permissible value of point in this buffer.\n\ | 957 | /* Return a marker to the maximum permissible value of point in this buffer. |
| 957 | This is (1+ (buffer-size)), unless narrowing (a buffer restriction)\n\ | 958 | This is (1+ (buffer-size)), unless narrowing (a buffer restriction) |
| 958 | is in effect, in which case it is less.") | 959 | is in effect, in which case it is less. */ |
| 959 | () | 960 | ()) |
| 960 | { | 961 | { |
| 961 | return buildmark (ZV, ZV_BYTE); | 962 | return buildmark (ZV, ZV_BYTE); |
| 962 | } | 963 | } |
| 963 | 964 | ||
| 964 | DEFUN ("gap-position", Fgap_position, Sgap_position, 0, 0, 0, | 965 | DEFUN ("gap-position", Fgap_position, Sgap_position, 0, 0, 0, |
| 965 | "Return the position of the gap, in the current buffer.\n\ | 966 | /* Return the position of the gap, in the current buffer. |
| 966 | See also `gap-size'.") | 967 | See also `gap-size'. */ |
| 967 | () | 968 | ()) |
| 968 | { | 969 | { |
| 969 | Lisp_Object temp; | 970 | Lisp_Object temp; |
| 970 | XSETFASTINT (temp, GPT); | 971 | XSETFASTINT (temp, GPT); |
| @@ -972,9 +973,9 @@ See also `gap-size'.") | |||
| 972 | } | 973 | } |
| 973 | 974 | ||
| 974 | DEFUN ("gap-size", Fgap_size, Sgap_size, 0, 0, 0, | 975 | DEFUN ("gap-size", Fgap_size, Sgap_size, 0, 0, 0, |
| 975 | "Return the size of the current buffer's gap.\n\ | 976 | /* Return the size of the current buffer's gap. |
| 976 | See also `gap-position'.") | 977 | See also `gap-position'. */ |
| 977 | () | 978 | ()) |
| 978 | { | 979 | { |
| 979 | Lisp_Object temp; | 980 | Lisp_Object temp; |
| 980 | XSETFASTINT (temp, GAP_SIZE); | 981 | XSETFASTINT (temp, GAP_SIZE); |
| @@ -982,9 +983,9 @@ See also `gap-position'.") | |||
| 982 | } | 983 | } |
| 983 | 984 | ||
| 984 | DEFUN ("position-bytes", Fposition_bytes, Sposition_bytes, 1, 1, 0, | 985 | DEFUN ("position-bytes", Fposition_bytes, Sposition_bytes, 1, 1, 0, |
| 985 | "Return the byte position for character position POSITION.\n\ | 986 | /* Return the byte position for character position POSITION. |
| 986 | If POSITION is out of range, the value is nil.") | 987 | If POSITION is out of range, the value is nil. */ |
| 987 | (position) | 988 | (position)) |
| 988 | Lisp_Object position; | 989 | Lisp_Object position; |
| 989 | { | 990 | { |
| 990 | CHECK_NUMBER_COERCE_MARKER (position, 1); | 991 | CHECK_NUMBER_COERCE_MARKER (position, 1); |
| @@ -994,9 +995,9 @@ If POSITION is out of range, the value is nil.") | |||
| 994 | } | 995 | } |
| 995 | 996 | ||
| 996 | DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0, | 997 | DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0, |
| 997 | "Return the character position for byte position BYTEPOS.\n\ | 998 | /* Return the character position for byte position BYTEPOS. |
| 998 | If BYTEPOS is out of range, the value is nil.") | 999 | If BYTEPOS is out of range, the value is nil. */ |
| 999 | (bytepos) | 1000 | (bytepos)) |
| 1000 | Lisp_Object bytepos; | 1001 | Lisp_Object bytepos; |
| 1001 | { | 1002 | { |
| 1002 | CHECK_NUMBER (bytepos, 1); | 1003 | CHECK_NUMBER (bytepos, 1); |
| @@ -1006,9 +1007,9 @@ If BYTEPOS is out of range, the value is nil.") | |||
| 1006 | } | 1007 | } |
| 1007 | 1008 | ||
| 1008 | DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, | 1009 | DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, |
| 1009 | "Return the character following point, as a number.\n\ | 1010 | /* Return the character following point, as a number. |
| 1010 | At the end of the buffer or accessible region, return 0.") | 1011 | At the end of the buffer or accessible region, return 0. */ |
| 1011 | () | 1012 | ()) |
| 1012 | { | 1013 | { |
| 1013 | Lisp_Object temp; | 1014 | Lisp_Object temp; |
| 1014 | if (PT >= ZV) | 1015 | if (PT >= ZV) |
| @@ -1019,9 +1020,9 @@ At the end of the buffer or accessible region, return 0.") | |||
| 1019 | } | 1020 | } |
| 1020 | 1021 | ||
| 1021 | DEFUN ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0, | 1022 | DEFUN ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0, |
| 1022 | "Return the character preceding point, as a number.\n\ | 1023 | /* Return the character preceding point, as a number. |
| 1023 | At the beginning of the buffer or accessible region, return 0.") | 1024 | At the beginning of the buffer or accessible region, return 0. */ |
| 1024 | () | 1025 | ()) |
| 1025 | { | 1026 | { |
| 1026 | Lisp_Object temp; | 1027 | Lisp_Object temp; |
| 1027 | if (PT <= BEGV) | 1028 | if (PT <= BEGV) |
| @@ -1038,9 +1039,9 @@ At the beginning of the buffer or accessible region, return 0.") | |||
| 1038 | } | 1039 | } |
| 1039 | 1040 | ||
| 1040 | DEFUN ("bobp", Fbobp, Sbobp, 0, 0, 0, | 1041 | DEFUN ("bobp", Fbobp, Sbobp, 0, 0, 0, |
| 1041 | "Return t if point is at the beginning of the buffer.\n\ | 1042 | /* Return t if point is at the beginning of the buffer. |
| 1042 | If the buffer is narrowed, this means the beginning of the narrowed part.") | 1043 | If the buffer is narrowed, this means the beginning of the narrowed part. */ |
| 1043 | () | 1044 | ()) |
| 1044 | { | 1045 | { |
| 1045 | if (PT == BEGV) | 1046 | if (PT == BEGV) |
| 1046 | return Qt; | 1047 | return Qt; |
| @@ -1048,9 +1049,9 @@ If the buffer is narrowed, this means the beginning of the narrowed part.") | |||
| 1048 | } | 1049 | } |
| 1049 | 1050 | ||
| 1050 | DEFUN ("eobp", Feobp, Seobp, 0, 0, 0, | 1051 | DEFUN ("eobp", Feobp, Seobp, 0, 0, 0, |
| 1051 | "Return t if point is at the end of the buffer.\n\ | 1052 | /* Return t if point is at the end of the buffer. |
| 1052 | If the buffer is narrowed, this means the end of the narrowed part.") | 1053 | If the buffer is narrowed, this means the end of the narrowed part. */ |
| 1053 | () | 1054 | ()) |
| 1054 | { | 1055 | { |
| 1055 | if (PT == ZV) | 1056 | if (PT == ZV) |
| 1056 | return Qt; | 1057 | return Qt; |
| @@ -1058,8 +1059,8 @@ If the buffer is narrowed, this means the end of the narrowed part.") | |||
| 1058 | } | 1059 | } |
| 1059 | 1060 | ||
| 1060 | DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, | 1061 | DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, |
| 1061 | "Return t if point is at the beginning of a line.") | 1062 | /* Return t if point is at the beginning of a line. */ |
| 1062 | () | 1063 | ()) |
| 1063 | { | 1064 | { |
| 1064 | if (PT == BEGV || FETCH_BYTE (PT_BYTE - 1) == '\n') | 1065 | if (PT == BEGV || FETCH_BYTE (PT_BYTE - 1) == '\n') |
| 1065 | return Qt; | 1066 | return Qt; |
| @@ -1067,9 +1068,9 @@ DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, | |||
| 1067 | } | 1068 | } |
| 1068 | 1069 | ||
| 1069 | DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, | 1070 | DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, |
| 1070 | "Return t if point is at the end of a line.\n\ | 1071 | /* Return t if point is at the end of a line. |
| 1071 | `End of a line' includes point being at the end of the buffer.") | 1072 | `End of a line' includes point being at the end of the buffer. */ |
| 1072 | () | 1073 | ()) |
| 1073 | { | 1074 | { |
| 1074 | if (PT == ZV || FETCH_BYTE (PT_BYTE) == '\n') | 1075 | if (PT == ZV || FETCH_BYTE (PT_BYTE) == '\n') |
| 1075 | return Qt; | 1076 | return Qt; |
| @@ -1077,10 +1078,10 @@ DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, | |||
| 1077 | } | 1078 | } |
| 1078 | 1079 | ||
| 1079 | DEFUN ("char-after", Fchar_after, Schar_after, 0, 1, 0, | 1080 | DEFUN ("char-after", Fchar_after, Schar_after, 0, 1, 0, |
| 1080 | "Return character in current buffer at position POS.\n\ | 1081 | /* Return character in current buffer at position POS. |
| 1081 | POS is an integer or a marker.\n\ | 1082 | POS is an integer or a marker. |
| 1082 | If POS is out of range, the value is nil.") | 1083 | If POS is out of range, the value is nil. */ |
| 1083 | (pos) | 1084 | (pos)) |
| 1084 | Lisp_Object pos; | 1085 | Lisp_Object pos; |
| 1085 | { | 1086 | { |
| 1086 | register int pos_byte; | 1087 | register int pos_byte; |
| @@ -1110,10 +1111,10 @@ If POS is out of range, the value is nil.") | |||
| 1110 | } | 1111 | } |
| 1111 | 1112 | ||
| 1112 | DEFUN ("char-before", Fchar_before, Schar_before, 0, 1, 0, | 1113 | DEFUN ("char-before", Fchar_before, Schar_before, 0, 1, 0, |
| 1113 | "Return character in current buffer preceding position POS.\n\ | 1114 | /* Return character in current buffer preceding position POS. |
| 1114 | POS is an integer or a marker.\n\ | 1115 | POS is an integer or a marker. |
| 1115 | If POS is out of range, the value is nil.") | 1116 | If POS is out of range, the value is nil. */ |
| 1116 | (pos) | 1117 | (pos)) |
| 1117 | Lisp_Object pos; | 1118 | Lisp_Object pos; |
| 1118 | { | 1119 | { |
| 1119 | register Lisp_Object val; | 1120 | register Lisp_Object val; |
| @@ -1156,13 +1157,14 @@ If POS is out of range, the value is nil.") | |||
| 1156 | } | 1157 | } |
| 1157 | 1158 | ||
| 1158 | DEFUN ("user-login-name", Fuser_login_name, Suser_login_name, 0, 1, 0, | 1159 | DEFUN ("user-login-name", Fuser_login_name, Suser_login_name, 0, 1, 0, |
| 1159 | "Return the name under which the user logged in, as a string.\n\ | 1160 | /* Return the name under which the user logged in, as a string. |
| 1160 | This is based on the effective uid, not the real uid.\n\ | 1161 | This is based on the effective uid, not the real uid. |
| 1161 | Also, if the environment variable LOGNAME or USER is set,\n\ | 1162 | Also, if the environment variable LOGNAME or USER is set, |
| 1162 | that determines the value of this function.\n\n\ | 1163 | that determines the value of this function. |
| 1163 | If optional argument UID is an integer, return the login name of the user\n\ | 1164 | |
| 1164 | with that uid, or nil if there is no such user.") | 1165 | If optional argument UID is an integer, return the login name of the user |
| 1165 | (uid) | 1166 | with that uid, or nil if there is no such user. */ |
| 1167 | (uid)) | ||
| 1166 | Lisp_Object uid; | 1168 | Lisp_Object uid; |
| 1167 | { | 1169 | { |
| 1168 | struct passwd *pw; | 1170 | struct passwd *pw; |
| @@ -1183,10 +1185,10 @@ with that uid, or nil if there is no such user.") | |||
| 1183 | 1185 | ||
| 1184 | DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name, | 1186 | DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name, |
| 1185 | 0, 0, 0, | 1187 | 0, 0, 0, |
| 1186 | "Return the name of the user's real uid, as a string.\n\ | 1188 | /* Return the name of the user's real uid, as a string. |
| 1187 | This ignores the environment variables LOGNAME and USER, so it differs from\n\ | 1189 | This ignores the environment variables LOGNAME and USER, so it differs from |
| 1188 | `user-login-name' when running under `su'.") | 1190 | `user-login-name' when running under `su'. */ |
| 1189 | () | 1191 | ()) |
| 1190 | { | 1192 | { |
| 1191 | /* Set up the user name info if we didn't do it before. | 1193 | /* Set up the user name info if we didn't do it before. |
| 1192 | (That can happen if Emacs is dumpable | 1194 | (That can happen if Emacs is dumpable |
| @@ -1197,31 +1199,31 @@ This ignores the environment variables LOGNAME and USER, so it differs from\n\ | |||
| 1197 | } | 1199 | } |
| 1198 | 1200 | ||
| 1199 | DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0, | 1201 | DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0, |
| 1200 | "Return the effective uid of Emacs.\n\ | 1202 | /* Return the effective uid of Emacs. |
| 1201 | Value is an integer or float, depending on the value.") | 1203 | Value is an integer or float, depending on the value. */ |
| 1202 | () | 1204 | ()) |
| 1203 | { | 1205 | { |
| 1204 | return make_fixnum_or_float (geteuid ()); | 1206 | return make_fixnum_or_float (geteuid ()); |
| 1205 | } | 1207 | } |
| 1206 | 1208 | ||
| 1207 | DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, | 1209 | DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, |
| 1208 | "Return the real uid of Emacs.\n\ | 1210 | /* Return the real uid of Emacs. |
| 1209 | Value is an integer or float, depending on the value.") | 1211 | Value is an integer or float, depending on the value. */ |
| 1210 | () | 1212 | ()) |
| 1211 | { | 1213 | { |
| 1212 | return make_fixnum_or_float (getuid ()); | 1214 | return make_fixnum_or_float (getuid ()); |
| 1213 | } | 1215 | } |
| 1214 | 1216 | ||
| 1215 | DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0, | 1217 | DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0, |
| 1216 | "Return the full name of the user logged in, as a string.\n\ | 1218 | /* Return the full name of the user logged in, as a string. |
| 1217 | If the full name corresponding to Emacs's userid is not known,\n\ | 1219 | If the full name corresponding to Emacs's userid is not known, |
| 1218 | return \"unknown\".\n\ | 1220 | return "unknown". |
| 1219 | \n\ | 1221 | |
| 1220 | If optional argument UID is an integer or float, return the full name\n\ | 1222 | If optional argument UID is an integer or float, return the full name |
| 1221 | of the user with that uid, or nil if there is no such user.\n\ | 1223 | of the user with that uid, or nil if there is no such user. |
| 1222 | If UID is a string, return the full name of the user with that login\n\ | 1224 | If UID is a string, return the full name of the user with that login |
| 1223 | name, or nil if there is no such user.") | 1225 | name, or nil if there is no such user. */ |
| 1224 | (uid) | 1226 | (uid)) |
| 1225 | Lisp_Object uid; | 1227 | Lisp_Object uid; |
| 1226 | { | 1228 | { |
| 1227 | struct passwd *pw; | 1229 | struct passwd *pw; |
| @@ -1269,8 +1271,8 @@ name, or nil if there is no such user.") | |||
| 1269 | } | 1271 | } |
| 1270 | 1272 | ||
| 1271 | DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, | 1273 | DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, |
| 1272 | "Return the name of the machine you are running on, as a string.") | 1274 | /* Return the name of the machine you are running on, as a string. */ |
| 1273 | () | 1275 | ()) |
| 1274 | { | 1276 | { |
| 1275 | return Vsystem_name; | 1277 | return Vsystem_name; |
| 1276 | } | 1278 | } |
| @@ -1287,22 +1289,22 @@ get_system_name () | |||
| 1287 | } | 1289 | } |
| 1288 | 1290 | ||
| 1289 | DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, | 1291 | DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, |
| 1290 | "Return the process ID of Emacs, as an integer.") | 1292 | /* Return the process ID of Emacs, as an integer. */ |
| 1291 | () | 1293 | ()) |
| 1292 | { | 1294 | { |
| 1293 | return make_number (getpid ()); | 1295 | return make_number (getpid ()); |
| 1294 | } | 1296 | } |
| 1295 | 1297 | ||
| 1296 | DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, | 1298 | DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, |
| 1297 | "Return the current time, as the number of seconds since 1970-01-01 00:00:00.\n\ | 1299 | /* Return the current time, as the number of seconds since 1970-01-01 00:00:00. |
| 1298 | The time is returned as a list of three integers. The first has the\n\ | 1300 | The time is returned as a list of three integers. The first has the |
| 1299 | most significant 16 bits of the seconds, while the second has the\n\ | 1301 | most significant 16 bits of the seconds, while the second has the |
| 1300 | least significant 16 bits. The third integer gives the microsecond\n\ | 1302 | least significant 16 bits. The third integer gives the microsecond |
| 1301 | count.\n\ | 1303 | count. |
| 1302 | \n\ | 1304 | |
| 1303 | The microsecond count is zero on systems that do not provide\n\ | 1305 | The microsecond count is zero on systems that do not provide |
| 1304 | resolution finer than a second.") | 1306 | resolution finer than a second. */ |
| 1305 | () | 1307 | ()) |
| 1306 | { | 1308 | { |
| 1307 | EMACS_TIME t; | 1309 | EMACS_TIME t; |
| 1308 | Lisp_Object result[3]; | 1310 | Lisp_Object result[3]; |
| @@ -1368,16 +1370,16 @@ lisp_time_argument (specified_time, result, usec) | |||
| 1368 | } | 1370 | } |
| 1369 | 1371 | ||
| 1370 | DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0, | 1372 | DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0, |
| 1371 | "Return the current time, as a float number of seconds since the epoch.\n\ | 1373 | /* Return the current time, as a float number of seconds since the epoch. |
| 1372 | If an argument is given, it specifies a time to convert to float\n\ | 1374 | If an argument is given, it specifies a time to convert to float |
| 1373 | instead of the current time. The argument should have the forms:\n\ | 1375 | instead of the current time. The argument should have the forms: |
| 1374 | (HIGH . LOW) or (HIGH LOW USEC) or (HIGH LOW . USEC).\n\ | 1376 | (HIGH . LOW) or (HIGH LOW USEC) or (HIGH LOW . USEC). |
| 1375 | Thus, you can use times obtained from `current-time'\n\ | 1377 | Thus, you can use times obtained from `current-time' |
| 1376 | and from `file-attributes'.\n\ | 1378 | and from `file-attributes'. |
| 1377 | \n\ | 1379 | |
| 1378 | WARNING: Since the result is floating point, it may not be exact.\n\ | 1380 | WARNING: Since the result is floating point, it may not be exact. |
| 1379 | Do not use this function if precise time stamps are required.") | 1381 | Do not use this function if precise time stamps are required. */ |
| 1380 | (specified_time) | 1382 | (specified_time)) |
| 1381 | Lisp_Object specified_time; | 1383 | Lisp_Object specified_time; |
| 1382 | { | 1384 | { |
| 1383 | time_t sec; | 1385 | time_t sec; |
| @@ -1443,63 +1445,57 @@ emacs_memftimeu (s, maxsize, format, format_len, tp, ut) | |||
| 1443 | } | 1445 | } |
| 1444 | } | 1446 | } |
| 1445 | 1447 | ||
| 1446 | /* | ||
| 1447 | DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, | ||
| 1448 | "Use FORMAT-STRING to format the time TIME, or now if omitted.\n\ | ||
| 1449 | TIME is specified as (HIGH LOW . IGNORED) or (HIGH . LOW), as returned by\n\ | ||
| 1450 | `current-time' or `file-attributes'.\n\ | ||
| 1451 | The third, optional, argument UNIVERSAL, if non-nil, means describe TIME\n\ | ||
| 1452 | as Universal Time; nil means describe TIME in the local time zone.\n\ | ||
| 1453 | The value is a copy of FORMAT-STRING, but with certain constructs replaced\n\ | ||
| 1454 | by text that describes the specified date and time in TIME:\n\ | ||
| 1455 | \n\ | ||
| 1456 | %Y is the year, %y within the century, %C the century.\n\ | ||
| 1457 | %G is the year corresponding to the ISO week, %g within the century.\n\ | ||
| 1458 | %m is the numeric month.\n\ | ||
| 1459 | %b and %h are the locale's abbreviated month name, %B the full name.\n\ | ||
| 1460 | %d is the day of the month, zero-padded, %e is blank-padded.\n\ | ||
| 1461 | %u is the numeric day of week from 1 (Monday) to 7, %w from 0 (Sunday) to 6.\n\ | ||
| 1462 | %a is the locale's abbreviated name of the day of week, %A the full name.\n\ | ||
| 1463 | %U is the week number starting on Sunday, %W starting on Monday,\n\ | ||
| 1464 | %V according to ISO 8601.\n\ | ||
| 1465 | %j is the day of the year.\n\ | ||
| 1466 | \n\ | ||
| 1467 | %H is the hour on a 24-hour clock, %I is on a 12-hour clock, %k is like %H\n\ | ||
| 1468 | only blank-padded, %l is like %I blank-padded.\n\ | ||
| 1469 | %p is the locale's equivalent of either AM or PM.\n\ | ||
| 1470 | %M is the minute.\n\ | ||
| 1471 | %S is the second.\n\ | ||
| 1472 | %Z is the time zone name, %z is the numeric form.\n\ | ||
| 1473 | %s is the number of seconds since 1970-01-01 00:00:00 +0000.\n\ | ||
| 1474 | \n\ | ||
| 1475 | %c is the locale's date and time format.\n\ | ||
| 1476 | %x is the locale's \"preferred\" date format.\n\ | ||
| 1477 | %D is like \"%m/%d/%y\".\n\ | ||
| 1478 | \n\ | ||
| 1479 | %R is like \"%H:%M\", %T is like \"%H:%M:%S\", %r is like \"%I:%M:%S %p\".\n\ | ||
| 1480 | %X is the locale's \"preferred\" time format.\n\ | ||
| 1481 | \n\ | ||
| 1482 | Finally, %n is a newline, %t is a tab, %% is a literal %.\n\ | ||
| 1483 | \n\ | ||
| 1484 | Certain flags and modifiers are available with some format controls.\n\ | ||
| 1485 | The flags are `_', `-', `^' and `#'. For certain characters X,\n\ | ||
| 1486 | %_X is like %X, but padded with blanks; %-X is like %X,\n\ | ||
| 1487 | ut without padding. %^X is like %X but with all textual\n\ | ||
| 1488 | characters up-cased; %#X is like %X but with letter-case of\n\ | ||
| 1489 | all textual characters reversed.\n\ | ||
| 1490 | %NX (where N stands for an integer) is like %X,\n\ | ||
| 1491 | but takes up at least N (a number) positions.\n\ | ||
| 1492 | The modifiers are `E' and `O'. For certain characters X,\n\ | ||
| 1493 | %EX is a locale's alternative version of %X;\n\ | ||
| 1494 | %OX is like %X, but uses the locale's number symbols.\n\ | ||
| 1495 | \n\ | ||
| 1496 | For example, to produce full ISO 8601 format, use \"%Y-%m-%dT%T%z\".") | ||
| 1497 | (format_string, time, universal) | ||
| 1498 | */ | ||
| 1499 | |||
| 1500 | DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, | 1448 | DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, |
| 1501 | 0 /* See immediately above */) | 1449 | /* Use FORMAT-STRING to format the time TIME, or now if omitted. |
| 1502 | (format_string, time, universal) | 1450 | TIME is specified as (HIGH LOW . IGNORED) or (HIGH . LOW), as returned by |
| 1451 | `current-time' or `file-attributes'. | ||
| 1452 | The third, optional, argument UNIVERSAL, if non-nil, means describe TIME | ||
| 1453 | as Universal Time; nil means describe TIME in the local time zone. | ||
| 1454 | The value is a copy of FORMAT-STRING, but with certain constructs replaced | ||
| 1455 | by text that describes the specified date and time in TIME: | ||
| 1456 | |||
| 1457 | %Y is the year, %y within the century, %C the century. | ||
| 1458 | %G is the year corresponding to the ISO week, %g within the century. | ||
| 1459 | %m is the numeric month. | ||
| 1460 | %b and %h are the locale's abbreviated month name, %B the full name. | ||
| 1461 | %d is the day of the month, zero-padded, %e is blank-padded. | ||
| 1462 | %u is the numeric day of week from 1 (Monday) to 7, %w from 0 (Sunday) to 6. | ||
| 1463 | %a is the locale's abbreviated name of the day of week, %A the full name. | ||
| 1464 | %U is the week number starting on Sunday, %W starting on Monday, | ||
| 1465 | %V according to ISO 8601. | ||
| 1466 | %j is the day of the year. | ||
| 1467 | |||
| 1468 | %H is the hour on a 24-hour clock, %I is on a 12-hour clock, %k is like %H | ||
| 1469 | only blank-padded, %l is like %I blank-padded. | ||
| 1470 | %p is the locale's equivalent of either AM or PM. | ||
| 1471 | %M is the minute. | ||
| 1472 | %S is the second. | ||
| 1473 | %Z is the time zone name, %z is the numeric form. | ||
| 1474 | %s is the number of seconds since 1970-01-01 00:00:00 +0000. | ||
| 1475 | |||
| 1476 | %c is the locale's date and time format. | ||
| 1477 | %x is the locale's "preferred" date format. | ||
| 1478 | %D is like "%m/%d/%y". | ||
| 1479 | |||
| 1480 | %R is like "%H:%M", %T is like "%H:%M:%S", %r is like "%I:%M:%S %p". | ||
| 1481 | %X is the locale's "preferred" time format. | ||
| 1482 | |||
| 1483 | Finally, %n is a newline, %t is a tab, %% is a literal %. | ||
| 1484 | |||
| 1485 | Certain flags and modifiers are available with some format controls. | ||
| 1486 | The flags are `_', `-', `^' and `#'. For certain characters X, | ||
| 1487 | %_X is like %X, but padded with blanks; %-X is like %X, | ||
| 1488 | ut without padding. %^X is like %X but with all textual | ||
| 1489 | characters up-cased; %#X is like %X but with letter-case of | ||
| 1490 | all textual characters reversed. | ||
| 1491 | %NX (where N stands for an integer) is like %X, | ||
| 1492 | but takes up at least N (a number) positions. | ||
| 1493 | The modifiers are `E' and `O'. For certain characters X, | ||
| 1494 | %EX is a locale's alternative version of %X; | ||
| 1495 | %OX is like %X, but uses the locale's number symbols. | ||
| 1496 | |||
| 1497 | For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */ | ||
| 1498 | (format_string, time, universal)) | ||
| 1503 | Lisp_Object format_string, time, universal; | 1499 | Lisp_Object format_string, time, universal; |
| 1504 | { | 1500 | { |
| 1505 | time_t value; | 1501 | time_t value; |
| @@ -1547,19 +1543,19 @@ DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, | |||
| 1547 | } | 1543 | } |
| 1548 | 1544 | ||
| 1549 | DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0, | 1545 | DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0, |
| 1550 | "Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE).\n\ | 1546 | /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE). |
| 1551 | The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED)\n\ | 1547 | The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED) |
| 1552 | or (HIGH . LOW), as from `current-time' and `file-attributes', or `nil'\n\ | 1548 | or (HIGH . LOW), as from `current-time' and `file-attributes', or `nil' |
| 1553 | to use the current time. The list has the following nine members:\n\ | 1549 | to use the current time. The list has the following nine members: |
| 1554 | SEC is an integer between 0 and 60; SEC is 60 for a leap second, which\n\ | 1550 | SEC is an integer between 0 and 60; SEC is 60 for a leap second, which |
| 1555 | only some operating systems support. MINUTE is an integer between 0 and 59.\n\ | 1551 | only some operating systems support. MINUTE is an integer between 0 and 59. |
| 1556 | HOUR is an integer between 0 and 23. DAY is an integer between 1 and 31.\n\ | 1552 | HOUR is an integer between 0 and 23. DAY is an integer between 1 and 31. |
| 1557 | MONTH is an integer between 1 and 12. YEAR is an integer indicating the\n\ | 1553 | MONTH is an integer between 1 and 12. YEAR is an integer indicating the |
| 1558 | four-digit year. DOW is the day of week, an integer between 0 and 6, where\n\ | 1554 | four-digit year. DOW is the day of week, an integer between 0 and 6, where |
| 1559 | 0 is Sunday. DST is t if daylight savings time is effect, otherwise nil.\n\ | 1555 | 0 is Sunday. DST is t if daylight savings time is effect, otherwise nil. |
| 1560 | ZONE is an integer indicating the number of seconds east of Greenwich.\n\ | 1556 | ZONE is an integer indicating the number of seconds east of Greenwich. |
| 1561 | \(Note that Common Lisp has different meanings for DOW and ZONE.)") | 1557 | (Note that Common Lisp has different meanings for DOW and ZONE.) */ |
| 1562 | (specified_time) | 1558 | (specified_time)) |
| 1563 | Lisp_Object specified_time; | 1559 | Lisp_Object specified_time; |
| 1564 | { | 1560 | { |
| 1565 | time_t time_spec; | 1561 | time_t time_spec; |
| @@ -1593,23 +1589,23 @@ ZONE is an integer indicating the number of seconds east of Greenwich.\n\ | |||
| 1593 | } | 1589 | } |
| 1594 | 1590 | ||
| 1595 | DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0, | 1591 | DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0, |
| 1596 | "Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time.\n\ | 1592 | /* Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time. |
| 1597 | This is the reverse operation of `decode-time', which see.\n\ | 1593 | This is the reverse operation of `decode-time', which see. |
| 1598 | ZONE defaults to the current time zone rule. This can\n\ | 1594 | ZONE defaults to the current time zone rule. This can |
| 1599 | be a string or t (as from `set-time-zone-rule'), or it can be a list\n\ | 1595 | be a string or t (as from `set-time-zone-rule'), or it can be a list |
| 1600 | \(as from `current-time-zone') or an integer (as from `decode-time')\n\ | 1596 | (as from `current-time-zone') or an integer (as from `decode-time') |
| 1601 | applied without consideration for daylight savings time.\n\ | 1597 | applied without consideration for daylight savings time. |
| 1602 | \n\ | 1598 | |
| 1603 | You can pass more than 7 arguments; then the first six arguments\n\ | 1599 | You can pass more than 7 arguments; then the first six arguments |
| 1604 | are used as SECOND through YEAR, and the *last* argument is used as ZONE.\n\ | 1600 | are used as SECOND through YEAR, and the *last* argument is used as ZONE. |
| 1605 | The intervening arguments are ignored.\n\ | 1601 | The intervening arguments are ignored. |
| 1606 | This feature lets (apply 'encode-time (decode-time ...)) work.\n\ | 1602 | This feature lets (apply 'encode-time (decode-time ...)) work. |
| 1607 | \n\ | 1603 | |
| 1608 | Out-of-range values for SEC, MINUTE, HOUR, DAY, or MONTH are allowed;\n\ | 1604 | Out-of-range values for SEC, MINUTE, HOUR, DAY, or MONTH are allowed; |
| 1609 | for example, a DAY of 0 means the day preceding the given month.\n\ | 1605 | for example, a DAY of 0 means the day preceding the given month. |
| 1610 | Year numbers less than 100 are treated just like other year numbers.\n\ | 1606 | Year numbers less than 100 are treated just like other year numbers. |
| 1611 | If you want them to stand for years in this century, you must do that yourself.") | 1607 | If you want them to stand for years in this century, you must do that yourself. */ |
| 1612 | (nargs, args) | 1608 | (nargs, args)) |
| 1613 | int nargs; | 1609 | int nargs; |
| 1614 | register Lisp_Object *args; | 1610 | register Lisp_Object *args; |
| 1615 | { | 1611 | { |
| @@ -1678,21 +1674,21 @@ If you want them to stand for years in this century, you must do that yourself." | |||
| 1678 | } | 1674 | } |
| 1679 | 1675 | ||
| 1680 | DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0, | 1676 | DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0, |
| 1681 | "Return the current time, as a human-readable string.\n\ | 1677 | /* Return the current time, as a human-readable string. |
| 1682 | Programs can use this function to decode a time,\n\ | 1678 | Programs can use this function to decode a time, |
| 1683 | since the number of columns in each field is fixed.\n\ | 1679 | since the number of columns in each field is fixed. |
| 1684 | The format is `Sun Sep 16 01:03:52 1973'.\n\ | 1680 | The format is `Sun Sep 16 01:03:52 1973'. |
| 1685 | However, see also the functions `decode-time' and `format-time-string'\n\ | 1681 | However, see also the functions `decode-time' and `format-time-string' |
| 1686 | which provide a much more powerful and general facility.\n\ | 1682 | which provide a much more powerful and general facility. |
| 1687 | \n\ | 1683 | |
| 1688 | If an argument is given, it specifies a time to format\n\ | 1684 | If an argument is given, it specifies a time to format |
| 1689 | instead of the current time. The argument should have the form:\n\ | 1685 | instead of the current time. The argument should have the form: |
| 1690 | (HIGH . LOW)\n\ | 1686 | (HIGH . LOW) |
| 1691 | or the form:\n\ | 1687 | or the form: |
| 1692 | (HIGH LOW . IGNORED).\n\ | 1688 | (HIGH LOW . IGNORED). |
| 1693 | Thus, you can use times obtained from `current-time'\n\ | 1689 | Thus, you can use times obtained from `current-time' |
| 1694 | and from `file-attributes'.") | 1690 | and from `file-attributes'. */ |
| 1695 | (specified_time) | 1691 | (specified_time)) |
| 1696 | Lisp_Object specified_time; | 1692 | Lisp_Object specified_time; |
| 1697 | { | 1693 | { |
| 1698 | time_t value; | 1694 | time_t value; |
| @@ -1736,23 +1732,23 @@ tm_diff (a, b) | |||
| 1736 | } | 1732 | } |
| 1737 | 1733 | ||
| 1738 | DEFUN ("current-time-zone", Fcurrent_time_zone, Scurrent_time_zone, 0, 1, 0, | 1734 | DEFUN ("current-time-zone", Fcurrent_time_zone, Scurrent_time_zone, 0, 1, 0, |
| 1739 | "Return the offset and name for the local time zone.\n\ | 1735 | /* Return the offset and name for the local time zone. |
| 1740 | This returns a list of the form (OFFSET NAME).\n\ | 1736 | This returns a list of the form (OFFSET NAME). |
| 1741 | OFFSET is an integer number of seconds ahead of UTC (east of Greenwich).\n\ | 1737 | OFFSET is an integer number of seconds ahead of UTC (east of Greenwich). |
| 1742 | A negative value means west of Greenwich.\n\ | 1738 | A negative value means west of Greenwich. |
| 1743 | NAME is a string giving the name of the time zone.\n\ | 1739 | NAME is a string giving the name of the time zone. |
| 1744 | If an argument is given, it specifies when the time zone offset is determined\n\ | 1740 | If an argument is given, it specifies when the time zone offset is determined |
| 1745 | instead of using the current time. The argument should have the form:\n\ | 1741 | instead of using the current time. The argument should have the form: |
| 1746 | (HIGH . LOW)\n\ | 1742 | (HIGH . LOW) |
| 1747 | or the form:\n\ | 1743 | or the form: |
| 1748 | (HIGH LOW . IGNORED).\n\ | 1744 | (HIGH LOW . IGNORED). |
| 1749 | Thus, you can use times obtained from `current-time'\n\ | 1745 | Thus, you can use times obtained from `current-time' |
| 1750 | and from `file-attributes'.\n\ | 1746 | and from `file-attributes'. |
| 1751 | \n\ | 1747 | |
| 1752 | Some operating systems cannot provide all this information to Emacs;\n\ | 1748 | Some operating systems cannot provide all this information to Emacs; |
| 1753 | in this case, `current-time-zone' returns a list containing nil for\n\ | 1749 | in this case, `current-time-zone' returns a list containing nil for |
| 1754 | the data it can't find.") | 1750 | the data it can't find. */ |
| 1755 | (specified_time) | 1751 | (specified_time)) |
| 1756 | Lisp_Object specified_time; | 1752 | Lisp_Object specified_time; |
| 1757 | { | 1753 | { |
| 1758 | time_t value; | 1754 | time_t value; |
| @@ -1808,10 +1804,10 @@ the data it can't find.") | |||
| 1808 | static char **environbuf; | 1804 | static char **environbuf; |
| 1809 | 1805 | ||
| 1810 | DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0, | 1806 | DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0, |
| 1811 | "Set the local time zone using TZ, a string specifying a time zone rule.\n\ | 1807 | /* Set the local time zone using TZ, a string specifying a time zone rule. |
| 1812 | If TZ is nil, use implementation-defined default time zone information.\n\ | 1808 | If TZ is nil, use implementation-defined default time zone information. |
| 1813 | If TZ is t, use Universal Time.") | 1809 | If TZ is t, use Universal Time. */ |
| 1814 | (tz) | 1810 | (tz)) |
| 1815 | Lisp_Object tz; | 1811 | Lisp_Object tz; |
| 1816 | { | 1812 | { |
| 1817 | char *tzstring; | 1813 | char *tzstring; |
| @@ -1995,16 +1991,16 @@ insert1 (arg) | |||
| 1995 | we don't care if it gets trashed. */ | 1991 | we don't care if it gets trashed. */ |
| 1996 | 1992 | ||
| 1997 | DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0, | 1993 | DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0, |
| 1998 | "Insert the arguments, either strings or characters, at point.\n\ | 1994 | /* Insert the arguments, either strings or characters, at point. |
| 1999 | Point and before-insertion markers move forward to end up\n\ | 1995 | Point and before-insertion markers move forward to end up |
| 2000 | after the inserted text.\n\ | 1996 | after the inserted text. |
| 2001 | Any other markers at the point of insertion remain before the text.\n\ | 1997 | Any other markers at the point of insertion remain before the text. |
| 2002 | \n\ | 1998 | |
| 2003 | If the current buffer is multibyte, unibyte strings are converted\n\ | 1999 | If the current buffer is multibyte, unibyte strings are converted |
| 2004 | to multibyte for insertion (see `unibyte-char-to-multibyte').\n\ | 2000 | to multibyte for insertion (see `unibyte-char-to-multibyte'). |
| 2005 | If the current buffer is unibyte, multibyte strings are converted\n\ | 2001 | If the current buffer is unibyte, multibyte strings are converted |
| 2006 | to unibyte for insertion.") | 2002 | to unibyte for insertion. */ |
| 2007 | (nargs, args) | 2003 | (nargs, args)) |
| 2008 | int nargs; | 2004 | int nargs; |
| 2009 | register Lisp_Object *args; | 2005 | register Lisp_Object *args; |
| 2010 | { | 2006 | { |
| @@ -2014,16 +2010,16 @@ to unibyte for insertion.") | |||
| 2014 | 2010 | ||
| 2015 | DEFUN ("insert-and-inherit", Finsert_and_inherit, Sinsert_and_inherit, | 2011 | DEFUN ("insert-and-inherit", Finsert_and_inherit, Sinsert_and_inherit, |
| 2016 | 0, MANY, 0, | 2012 | 0, MANY, 0, |
| 2017 | "Insert the arguments at point, inheriting properties from adjoining text.\n\ | 2013 | /* Insert the arguments at point, inheriting properties from adjoining text. |
| 2018 | Point and before-insertion markers move forward to end up\n\ | 2014 | Point and before-insertion markers move forward to end up |
| 2019 | after the inserted text.\n\ | 2015 | after the inserted text. |
| 2020 | Any other markers at the point of insertion remain before the text.\n\ | 2016 | Any other markers at the point of insertion remain before the text. |
| 2021 | \n\ | 2017 | |
| 2022 | If the current buffer is multibyte, unibyte strings are converted\n\ | 2018 | If the current buffer is multibyte, unibyte strings are converted |
| 2023 | to multibyte for insertion (see `unibyte-char-to-multibyte').\n\ | 2019 | to multibyte for insertion (see `unibyte-char-to-multibyte'). |
| 2024 | If the current buffer is unibyte, multibyte strings are converted\n\ | 2020 | If the current buffer is unibyte, multibyte strings are converted |
| 2025 | to unibyte for insertion.") | 2021 | to unibyte for insertion. */ |
| 2026 | (nargs, args) | 2022 | (nargs, args)) |
| 2027 | int nargs; | 2023 | int nargs; |
| 2028 | register Lisp_Object *args; | 2024 | register Lisp_Object *args; |
| 2029 | { | 2025 | { |
| @@ -2033,14 +2029,14 @@ to unibyte for insertion.") | |||
| 2033 | } | 2029 | } |
| 2034 | 2030 | ||
| 2035 | DEFUN ("insert-before-markers", Finsert_before_markers, Sinsert_before_markers, 0, MANY, 0, | 2031 | DEFUN ("insert-before-markers", Finsert_before_markers, Sinsert_before_markers, 0, MANY, 0, |
| 2036 | "Insert strings or characters at point, relocating markers after the text.\n\ | 2032 | /* Insert strings or characters at point, relocating markers after the text. |
| 2037 | Point and markers move forward to end up after the inserted text.\n\ | 2033 | Point and markers move forward to end up after the inserted text. |
| 2038 | \n\ | 2034 | |
| 2039 | If the current buffer is multibyte, unibyte strings are converted\n\ | 2035 | If the current buffer is multibyte, unibyte strings are converted |
| 2040 | to multibyte for insertion (see `unibyte-char-to-multibyte').\n\ | 2036 | to multibyte for insertion (see `unibyte-char-to-multibyte'). |
| 2041 | If the current buffer is unibyte, multibyte strings are converted\n\ | 2037 | If the current buffer is unibyte, multibyte strings are converted |
| 2042 | to unibyte for insertion.") | 2038 | to unibyte for insertion. */ |
| 2043 | (nargs, args) | 2039 | (nargs, args)) |
| 2044 | int nargs; | 2040 | int nargs; |
| 2045 | register Lisp_Object *args; | 2041 | register Lisp_Object *args; |
| 2046 | { | 2042 | { |
| @@ -2052,14 +2048,14 @@ to unibyte for insertion.") | |||
| 2052 | 2048 | ||
| 2053 | DEFUN ("insert-before-markers-and-inherit", Finsert_and_inherit_before_markers, | 2049 | DEFUN ("insert-before-markers-and-inherit", Finsert_and_inherit_before_markers, |
| 2054 | Sinsert_and_inherit_before_markers, 0, MANY, 0, | 2050 | Sinsert_and_inherit_before_markers, 0, MANY, 0, |
| 2055 | "Insert text at point, relocating markers and inheriting properties.\n\ | 2051 | /* Insert text at point, relocating markers and inheriting properties. |
| 2056 | Point and markers move forward to end up after the inserted text.\n\ | 2052 | Point and markers move forward to end up after the inserted text. |
| 2057 | \n\ | 2053 | |
| 2058 | If the current buffer is multibyte, unibyte strings are converted\n\ | 2054 | If the current buffer is multibyte, unibyte strings are converted |
| 2059 | to multibyte for insertion (see `unibyte-char-to-multibyte').\n\ | 2055 | to multibyte for insertion (see `unibyte-char-to-multibyte'). |
| 2060 | If the current buffer is unibyte, multibyte strings are converted\n\ | 2056 | If the current buffer is unibyte, multibyte strings are converted |
| 2061 | to unibyte for insertion.") | 2057 | to unibyte for insertion. */ |
| 2062 | (nargs, args) | 2058 | (nargs, args)) |
| 2063 | int nargs; | 2059 | int nargs; |
| 2064 | register Lisp_Object *args; | 2060 | register Lisp_Object *args; |
| 2065 | { | 2061 | { |
| @@ -2070,12 +2066,12 @@ to unibyte for insertion.") | |||
| 2070 | } | 2066 | } |
| 2071 | 2067 | ||
| 2072 | DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, | 2068 | DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, |
| 2073 | "Insert COUNT (second arg) copies of CHARACTER (first arg).\n\ | 2069 | /* Insert COUNT (second arg) copies of CHARACTER (first arg). |
| 2074 | Both arguments are required.\n\ | 2070 | Both arguments are required. |
| 2075 | Point, and before-insertion markers, are relocated as in the function `insert'.\n\ | 2071 | Point, and before-insertion markers, are relocated as in the function `insert'. |
| 2076 | The optional third arg INHERIT, if non-nil, says to inherit text properties\n\ | 2072 | The optional third arg INHERIT, if non-nil, says to inherit text properties |
| 2077 | from adjoining text, if those properties are sticky.") | 2073 | from adjoining text, if those properties are sticky. */ |
| 2078 | (character, count, inherit) | 2074 | (character, count, inherit)) |
| 2079 | Lisp_Object character, count, inherit; | 2075 | Lisp_Object character, count, inherit; |
| 2080 | { | 2076 | { |
| 2081 | register unsigned char *string; | 2077 | register unsigned char *string; |
| @@ -2226,15 +2222,15 @@ update_buffer_properties (start, end) | |||
| 2226 | } | 2222 | } |
| 2227 | 2223 | ||
| 2228 | DEFUN ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0, | 2224 | DEFUN ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0, |
| 2229 | "Return the contents of part of the current buffer as a string.\n\ | 2225 | /* Return the contents of part of the current buffer as a string. |
| 2230 | The two arguments START and END are character positions;\n\ | 2226 | The two arguments START and END are character positions; |
| 2231 | they can be in either order.\n\ | 2227 | they can be in either order. |
| 2232 | The string returned is multibyte if the buffer is multibyte.\n\ | 2228 | The string returned is multibyte if the buffer is multibyte. |
| 2233 | \n\ | 2229 | |
| 2234 | This function copies the text properties of that part of the buffer\n\ | 2230 | This function copies the text properties of that part of the buffer |
| 2235 | into the result string; if you don't want the text properties,\n\ | 2231 | into the result string; if you don't want the text properties, |
| 2236 | use `buffer-substring-no-properties' instead.") | 2232 | use `buffer-substring-no-properties' instead. */ |
| 2237 | (start, end) | 2233 | (start, end)) |
| 2238 | Lisp_Object start, end; | 2234 | Lisp_Object start, end; |
| 2239 | { | 2235 | { |
| 2240 | register int b, e; | 2236 | register int b, e; |
| @@ -2248,10 +2244,10 @@ use `buffer-substring-no-properties' instead.") | |||
| 2248 | 2244 | ||
| 2249 | DEFUN ("buffer-substring-no-properties", Fbuffer_substring_no_properties, | 2245 | DEFUN ("buffer-substring-no-properties", Fbuffer_substring_no_properties, |
| 2250 | Sbuffer_substring_no_properties, 2, 2, 0, | 2246 | Sbuffer_substring_no_properties, 2, 2, 0, |
| 2251 | "Return the characters of part of the buffer, without the text properties.\n\ | 2247 | /* Return the characters of part of the buffer, without the text properties. |
| 2252 | The two arguments START and END are character positions;\n\ | 2248 | The two arguments START and END are character positions; |
| 2253 | they can be in either order.") | 2249 | they can be in either order. */ |
| 2254 | (start, end) | 2250 | (start, end)) |
| 2255 | Lisp_Object start, end; | 2251 | Lisp_Object start, end; |
| 2256 | { | 2252 | { |
| 2257 | register int b, e; | 2253 | register int b, e; |
| @@ -2264,21 +2260,21 @@ they can be in either order.") | |||
| 2264 | } | 2260 | } |
| 2265 | 2261 | ||
| 2266 | DEFUN ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, | 2262 | DEFUN ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, |
| 2267 | "Return the contents of the current buffer as a string.\n\ | 2263 | /* Return the contents of the current buffer as a string. |
| 2268 | If narrowing is in effect, this function returns only the visible part\n\ | 2264 | If narrowing is in effect, this function returns only the visible part |
| 2269 | of the buffer.") | 2265 | of the buffer. */ |
| 2270 | () | 2266 | ()) |
| 2271 | { | 2267 | { |
| 2272 | return make_buffer_string (BEGV, ZV, 1); | 2268 | return make_buffer_string (BEGV, ZV, 1); |
| 2273 | } | 2269 | } |
| 2274 | 2270 | ||
| 2275 | DEFUN ("insert-buffer-substring", Finsert_buffer_substring, Sinsert_buffer_substring, | 2271 | DEFUN ("insert-buffer-substring", Finsert_buffer_substring, Sinsert_buffer_substring, |
| 2276 | 1, 3, 0, | 2272 | 1, 3, 0, |
| 2277 | "Insert before point a substring of the contents of buffer BUFFER.\n\ | 2273 | /* Insert before point a substring of the contents of buffer BUFFER. |
| 2278 | BUFFER may be a buffer or a buffer name.\n\ | 2274 | BUFFER may be a buffer or a buffer name. |
| 2279 | Arguments START and END are character numbers specifying the substring.\n\ | 2275 | Arguments START and END are character numbers specifying the substring. |
| 2280 | They default to the beginning and the end of BUFFER.") | 2276 | They default to the beginning and the end of BUFFER. */ |
| 2281 | (buf, start, end) | 2277 | (buf, start, end)) |
| 2282 | Lisp_Object buf, start, end; | 2278 | Lisp_Object buf, start, end; |
| 2283 | { | 2279 | { |
| 2284 | register int b, e, temp; | 2280 | register int b, e, temp; |
| @@ -2324,14 +2320,15 @@ They default to the beginning and the end of BUFFER.") | |||
| 2324 | 2320 | ||
| 2325 | DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings, | 2321 | DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings, |
| 2326 | 6, 6, 0, | 2322 | 6, 6, 0, |
| 2327 | "Compare two substrings of two buffers; return result as number.\n\ | 2323 | /* Compare two substrings of two buffers; return result as number. |
| 2328 | the value is -N if first string is less after N-1 chars,\n\ | 2324 | the value is -N if first string is less after N-1 chars, |
| 2329 | +N if first string is greater after N-1 chars, or 0 if strings match.\n\ | 2325 | +N if first string is greater after N-1 chars, or 0 if strings match. |
| 2330 | Each substring is represented as three arguments: BUFFER, START and END.\n\ | 2326 | Each substring is represented as three arguments: BUFFER, START and END. |
| 2331 | That makes six args in all, three for each substring.\n\n\ | 2327 | That makes six args in all, three for each substring. |
| 2332 | The value of `case-fold-search' in the current buffer\n\ | 2328 | |
| 2333 | determines whether case is significant or ignored.") | 2329 | The value of `case-fold-search' in the current buffer |
| 2334 | (buffer1, start1, end1, buffer2, start2, end2) | 2330 | determines whether case is significant or ignored. */ |
| 2331 | (buffer1, start1, end1, buffer2, start2, end2)) | ||
| 2335 | Lisp_Object buffer1, start1, end1, buffer2, start2, end2; | 2332 | Lisp_Object buffer1, start1, end1, buffer2, start2, end2; |
| 2336 | { | 2333 | { |
| 2337 | register int begp1, endp1, begp2, endp2, temp; | 2334 | register int begp1, endp1, begp2, endp2, temp; |
| @@ -2495,11 +2492,11 @@ subst_char_in_region_unwind_1 (arg) | |||
| 2495 | 2492 | ||
| 2496 | DEFUN ("subst-char-in-region", Fsubst_char_in_region, | 2493 | DEFUN ("subst-char-in-region", Fsubst_char_in_region, |
| 2497 | Ssubst_char_in_region, 4, 5, 0, | 2494 | Ssubst_char_in_region, 4, 5, 0, |
| 2498 | "From START to END, replace FROMCHAR with TOCHAR each time it occurs.\n\ | 2495 | /* From START to END, replace FROMCHAR with TOCHAR each time it occurs. |
| 2499 | If optional arg NOUNDO is non-nil, don't record this change for undo\n\ | 2496 | If optional arg NOUNDO is non-nil, don't record this change for undo |
| 2500 | and don't mark the buffer as really changed.\n\ | 2497 | and don't mark the buffer as really changed. |
| 2501 | Both characters must have the same length of multi-byte form.") | 2498 | Both characters must have the same length of multi-byte form. */ |
| 2502 | (start, end, fromchar, tochar, noundo) | 2499 | (start, end, fromchar, tochar, noundo)) |
| 2503 | Lisp_Object start, end, fromchar, tochar, noundo; | 2500 | Lisp_Object start, end, fromchar, tochar, noundo; |
| 2504 | { | 2501 | { |
| 2505 | register int pos, pos_byte, stop, i, len, end_byte; | 2502 | register int pos, pos_byte, stop, i, len, end_byte; |
| @@ -2662,12 +2659,12 @@ Both characters must have the same length of multi-byte form.") | |||
| 2662 | } | 2659 | } |
| 2663 | 2660 | ||
| 2664 | DEFUN ("translate-region", Ftranslate_region, Stranslate_region, 3, 3, 0, | 2661 | DEFUN ("translate-region", Ftranslate_region, Stranslate_region, 3, 3, 0, |
| 2665 | "From START to END, translate characters according to TABLE.\n\ | 2662 | /* From START to END, translate characters according to TABLE. |
| 2666 | TABLE is a string; the Nth character in it is the mapping\n\ | 2663 | TABLE is a string; the Nth character in it is the mapping |
| 2667 | for the character with code N.\n\ | 2664 | for the character with code N. |
| 2668 | This function does not alter multibyte characters.\n\ | 2665 | This function does not alter multibyte characters. |
| 2669 | It returns the number of characters changed.") | 2666 | It returns the number of characters changed. */ |
| 2670 | (start, end, table) | 2667 | (start, end, table)) |
| 2671 | Lisp_Object start; | 2668 | Lisp_Object start; |
| 2672 | Lisp_Object end; | 2669 | Lisp_Object end; |
| 2673 | register Lisp_Object table; | 2670 | register Lisp_Object table; |
| @@ -2751,10 +2748,10 @@ It returns the number of characters changed.") | |||
| 2751 | } | 2748 | } |
| 2752 | 2749 | ||
| 2753 | DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", | 2750 | DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", |
| 2754 | "Delete the text between point and mark.\n\ | 2751 | /* Delete the text between point and mark. |
| 2755 | When called from a program, expects two arguments,\n\ | 2752 | When called from a program, expects two arguments, |
| 2756 | positions (integers or markers) specifying the stretch to be deleted.") | 2753 | positions (integers or markers) specifying the stretch to be deleted. */ |
| 2757 | (start, end) | 2754 | (start, end)) |
| 2758 | Lisp_Object start, end; | 2755 | Lisp_Object start, end; |
| 2759 | { | 2756 | { |
| 2760 | validate_region (&start, &end); | 2757 | validate_region (&start, &end); |
| @@ -2764,8 +2761,8 @@ positions (integers or markers) specifying the stretch to be deleted.") | |||
| 2764 | 2761 | ||
| 2765 | DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, | 2762 | DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, |
| 2766 | Sdelete_and_extract_region, 2, 2, 0, | 2763 | Sdelete_and_extract_region, 2, 2, 0, |
| 2767 | "Delete the text between START and END and return it.") | 2764 | /* Delete the text between START and END and return it. */ |
| 2768 | (start, end) | 2765 | (start, end)) |
| 2769 | Lisp_Object start, end; | 2766 | Lisp_Object start, end; |
| 2770 | { | 2767 | { |
| 2771 | validate_region (&start, &end); | 2768 | validate_region (&start, &end); |
| @@ -2773,9 +2770,9 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, | |||
| 2773 | } | 2770 | } |
| 2774 | 2771 | ||
| 2775 | DEFUN ("widen", Fwiden, Swiden, 0, 0, "", | 2772 | DEFUN ("widen", Fwiden, Swiden, 0, 0, "", |
| 2776 | "Remove restrictions (narrowing) from current buffer.\n\ | 2773 | /* Remove restrictions (narrowing) from current buffer. |
| 2777 | This allows the buffer's full text to be seen and edited.") | 2774 | This allows the buffer's full text to be seen and edited. */ |
| 2778 | () | 2775 | ()) |
| 2779 | { | 2776 | { |
| 2780 | if (BEG != BEGV || Z != ZV) | 2777 | if (BEG != BEGV || Z != ZV) |
| 2781 | current_buffer->clip_changed = 1; | 2778 | current_buffer->clip_changed = 1; |
| @@ -2788,15 +2785,15 @@ This allows the buffer's full text to be seen and edited.") | |||
| 2788 | } | 2785 | } |
| 2789 | 2786 | ||
| 2790 | DEFUN ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 2, "r", | 2787 | DEFUN ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 2, "r", |
| 2791 | "Restrict editing in this buffer to the current region.\n\ | 2788 | /* Restrict editing in this buffer to the current region. |
| 2792 | The rest of the text becomes temporarily invisible and untouchable\n\ | 2789 | The rest of the text becomes temporarily invisible and untouchable |
| 2793 | but is not deleted; if you save the buffer in a file, the invisible\n\ | 2790 | but is not deleted; if you save the buffer in a file, the invisible |
| 2794 | text is included in the file. \\[widen] makes all visible again.\n\ | 2791 | text is included in the file. \\[widen] makes all visible again. |
| 2795 | See also `save-restriction'.\n\ | 2792 | See also `save-restriction'. |
| 2796 | \n\ | 2793 | |
| 2797 | When calling from a program, pass two arguments; positions (integers\n\ | 2794 | When calling from a program, pass two arguments; positions (integers |
| 2798 | or markers) bounding the text that should remain visible.") | 2795 | or markers) bounding the text that should remain visible. */ |
| 2799 | (start, end) | 2796 | (start, end)) |
| 2800 | register Lisp_Object start, end; | 2797 | register Lisp_Object start, end; |
| 2801 | { | 2798 | { |
| 2802 | CHECK_NUMBER_COERCE_MARKER (start, 0); | 2799 | CHECK_NUMBER_COERCE_MARKER (start, 0); |
| @@ -2898,21 +2895,21 @@ save_restriction_restore (data) | |||
| 2898 | } | 2895 | } |
| 2899 | 2896 | ||
| 2900 | DEFUN ("save-restriction", Fsave_restriction, Ssave_restriction, 0, UNEVALLED, 0, | 2897 | DEFUN ("save-restriction", Fsave_restriction, Ssave_restriction, 0, UNEVALLED, 0, |
| 2901 | "Execute BODY, saving and restoring current buffer's restrictions.\n\ | 2898 | /* Execute BODY, saving and restoring current buffer's restrictions. |
| 2902 | The buffer's restrictions make parts of the beginning and end invisible.\n\ | 2899 | The buffer's restrictions make parts of the beginning and end invisible. |
| 2903 | \(They are set up with `narrow-to-region' and eliminated with `widen'.)\n\ | 2900 | (They are set up with `narrow-to-region' and eliminated with `widen'.) |
| 2904 | This special form, `save-restriction', saves the current buffer's restrictions\n\ | 2901 | This special form, `save-restriction', saves the current buffer's restrictions |
| 2905 | when it is entered, and restores them when it is exited.\n\ | 2902 | when it is entered, and restores them when it is exited. |
| 2906 | So any `narrow-to-region' within BODY lasts only until the end of the form.\n\ | 2903 | So any `narrow-to-region' within BODY lasts only until the end of the form. |
| 2907 | The old restrictions settings are restored\n\ | 2904 | The old restrictions settings are restored |
| 2908 | even in case of abnormal exit (throw or error).\n\ | 2905 | even in case of abnormal exit (throw or error). |
| 2909 | \n\ | 2906 | |
| 2910 | The value returned is the value of the last form in BODY.\n\ | 2907 | The value returned is the value of the last form in BODY. |
| 2911 | \n\ | 2908 | |
| 2912 | Note: if you are using both `save-excursion' and `save-restriction',\n\ | 2909 | Note: if you are using both `save-excursion' and `save-restriction', |
| 2913 | use `save-excursion' outermost:\n\ | 2910 | use `save-excursion' outermost: |
| 2914 | (save-excursion (save-restriction ...))") | 2911 | (save-excursion (save-restriction ...)) */ |
| 2915 | (body) | 2912 | (body)) |
| 2916 | Lisp_Object body; | 2913 | Lisp_Object body; |
| 2917 | { | 2914 | { |
| 2918 | register Lisp_Object val; | 2915 | register Lisp_Object val; |
| @@ -2930,13 +2927,13 @@ static char *message_text; | |||
| 2930 | static int message_length; | 2927 | static int message_length; |
| 2931 | 2928 | ||
| 2932 | DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, | 2929 | DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, |
| 2933 | "Print a one-line message at the bottom of the screen.\n\ | 2930 | /* Print a one-line message at the bottom of the screen. |
| 2934 | The first argument is a format control string, and the rest are data\n\ | 2931 | The first argument is a format control string, and the rest are data |
| 2935 | to be formatted under control of the string. See `format' for details.\n\ | 2932 | to be formatted under control of the string. See `format' for details. |
| 2936 | \n\ | 2933 | |
| 2937 | If the first argument is nil, clear any existing message; let the\n\ | 2934 | If the first argument is nil, clear any existing message; let the |
| 2938 | minibuffer contents show.") | 2935 | minibuffer contents show. */ |
| 2939 | (nargs, args) | 2936 | (nargs, args)) |
| 2940 | int nargs; | 2937 | int nargs; |
| 2941 | Lisp_Object *args; | 2938 | Lisp_Object *args; |
| 2942 | { | 2939 | { |
| @@ -2955,14 +2952,14 @@ minibuffer contents show.") | |||
| 2955 | } | 2952 | } |
| 2956 | 2953 | ||
| 2957 | DEFUN ("message-box", Fmessage_box, Smessage_box, 1, MANY, 0, | 2954 | DEFUN ("message-box", Fmessage_box, Smessage_box, 1, MANY, 0, |
| 2958 | "Display a message, in a dialog box if possible.\n\ | 2955 | /* Display a message, in a dialog box if possible. |
| 2959 | If a dialog box is not available, use the echo area.\n\ | 2956 | If a dialog box is not available, use the echo area. |
| 2960 | The first argument is a format control string, and the rest are data\n\ | 2957 | The first argument is a format control string, and the rest are data |
| 2961 | to be formatted under control of the string. See `format' for details.\n\ | 2958 | to be formatted under control of the string. See `format' for details. |
| 2962 | \n\ | 2959 | |
| 2963 | If the first argument is nil, clear any existing message; let the\n\ | 2960 | If the first argument is nil, clear any existing message; let the |
| 2964 | minibuffer contents show.") | 2961 | minibuffer contents show. */ |
| 2965 | (nargs, args) | 2962 | (nargs, args)) |
| 2966 | int nargs; | 2963 | int nargs; |
| 2967 | Lisp_Object *args; | 2964 | Lisp_Object *args; |
| 2968 | { | 2965 | { |
| @@ -3013,16 +3010,16 @@ extern Lisp_Object last_nonmenu_event; | |||
| 3013 | #endif | 3010 | #endif |
| 3014 | 3011 | ||
| 3015 | DEFUN ("message-or-box", Fmessage_or_box, Smessage_or_box, 1, MANY, 0, | 3012 | DEFUN ("message-or-box", Fmessage_or_box, Smessage_or_box, 1, MANY, 0, |
| 3016 | "Display a message in a dialog box or in the echo area.\n\ | 3013 | /* Display a message in a dialog box or in the echo area. |
| 3017 | If this command was invoked with the mouse, use a dialog box if\n\ | 3014 | If this command was invoked with the mouse, use a dialog box if |
| 3018 | `use-dialog-box' is non-nil.\n\ | 3015 | `use-dialog-box' is non-nil. |
| 3019 | Otherwise, use the echo area.\n\ | 3016 | Otherwise, use the echo area. |
| 3020 | The first argument is a format control string, and the rest are data\n\ | 3017 | The first argument is a format control string, and the rest are data |
| 3021 | to be formatted under control of the string. See `format' for details.\n\ | 3018 | to be formatted under control of the string. See `format' for details. |
| 3022 | \n\ | 3019 | |
| 3023 | If the first argument is nil, clear any existing message; let the\n\ | 3020 | If the first argument is nil, clear any existing message; let the |
| 3024 | minibuffer contents show.") | 3021 | minibuffer contents show. */ |
| 3025 | (nargs, args) | 3022 | (nargs, args)) |
| 3026 | int nargs; | 3023 | int nargs; |
| 3027 | Lisp_Object *args; | 3024 | Lisp_Object *args; |
| 3028 | { | 3025 | { |
| @@ -3035,19 +3032,19 @@ minibuffer contents show.") | |||
| 3035 | } | 3032 | } |
| 3036 | 3033 | ||
| 3037 | DEFUN ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0, | 3034 | DEFUN ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0, |
| 3038 | "Return the string currently displayed in the echo area, or nil if none.") | 3035 | /* Return the string currently displayed in the echo area, or nil if none. */ |
| 3039 | () | 3036 | ()) |
| 3040 | { | 3037 | { |
| 3041 | return current_message (); | 3038 | return current_message (); |
| 3042 | } | 3039 | } |
| 3043 | 3040 | ||
| 3044 | 3041 | ||
| 3045 | DEFUN ("propertize", Fpropertize, Spropertize, 3, MANY, 0, | 3042 | DEFUN ("propertize", Fpropertize, Spropertize, 3, MANY, 0, |
| 3046 | "Return a copy of STRING with text properties added.\n\ | 3043 | /* Return a copy of STRING with text properties added. |
| 3047 | First argument is the string to copy.\n\ | 3044 | First argument is the string to copy. |
| 3048 | Remaining arguments form a sequence of PROPERTY VALUE pairs for text\n\ | 3045 | Remaining arguments form a sequence of PROPERTY VALUE pairs for text |
| 3049 | properties to add to the result ") | 3046 | properties to add to the result. */ |
| 3050 | (nargs, args) | 3047 | (nargs, args)) |
| 3051 | int nargs; | 3048 | int nargs; |
| 3052 | Lisp_Object *args; | 3049 | Lisp_Object *args; |
| 3053 | { | 3050 | { |
| @@ -3089,22 +3086,22 @@ properties to add to the result ") | |||
| 3089 | : STRING_BYTES (XSTRING (STRING))) | 3086 | : STRING_BYTES (XSTRING (STRING))) |
| 3090 | 3087 | ||
| 3091 | DEFUN ("format", Fformat, Sformat, 1, MANY, 0, | 3088 | DEFUN ("format", Fformat, Sformat, 1, MANY, 0, |
| 3092 | "Format a string out of a control-string and arguments.\n\ | 3089 | /* Format a string out of a control-string and arguments. |
| 3093 | The first argument is a control string.\n\ | 3090 | The first argument is a control string. |
| 3094 | The other arguments are substituted into it to make the result, a string.\n\ | 3091 | The other arguments are substituted into it to make the result, a string. |
| 3095 | It may contain %-sequences meaning to substitute the next argument.\n\ | 3092 | It may contain %-sequences meaning to substitute the next argument. |
| 3096 | %s means print a string argument. Actually, prints any object, with `princ'.\n\ | 3093 | %s means print a string argument. Actually, prints any object, with `princ'. |
| 3097 | %d means print as number in decimal (%o octal, %x hex).\n\ | 3094 | %d means print as number in decimal (%o octal, %x hex). |
| 3098 | %X is like %x, but uses upper case.\n\ | 3095 | %X is like %x, but uses upper case. |
| 3099 | %e means print a number in exponential notation.\n\ | 3096 | %e means print a number in exponential notation. |
| 3100 | %f means print a number in decimal-point notation.\n\ | 3097 | %f means print a number in decimal-point notation. |
| 3101 | %g means print a number in exponential notation\n\ | 3098 | %g means print a number in exponential notation |
| 3102 | or decimal-point notation, whichever uses fewer characters.\n\ | 3099 | or decimal-point notation, whichever uses fewer characters. |
| 3103 | %c means print a number as a single character.\n\ | 3100 | %c means print a number as a single character. |
| 3104 | %S means print any object as an s-expression (using `prin1').\n\ | 3101 | %S means print any object as an s-expression (using `prin1'). |
| 3105 | The argument used for %d, %o, %x, %e, %f, %g or %c must be a number.\n\ | 3102 | The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. |
| 3106 | Use %% to put a single % into the output.") | 3103 | Use %% to put a single % into the output. */ |
| 3107 | (nargs, args) | 3104 | (nargs, args)) |
| 3108 | int nargs; | 3105 | int nargs; |
| 3109 | register Lisp_Object *args; | 3106 | register Lisp_Object *args; |
| 3110 | { | 3107 | { |
| @@ -3528,10 +3525,10 @@ format1 (string1) | |||
| 3528 | } | 3525 | } |
| 3529 | 3526 | ||
| 3530 | DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0, | 3527 | DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0, |
| 3531 | "Return t if two characters match, optionally ignoring case.\n\ | 3528 | /* Return t if two characters match, optionally ignoring case. |
| 3532 | Both arguments must be characters (i.e. integers).\n\ | 3529 | Both arguments must be characters (i.e. integers). |
| 3533 | Case is ignored if `case-fold-search' is non-nil in the current buffer.") | 3530 | Case is ignored if `case-fold-search' is non-nil in the current buffer. */ |
| 3534 | (c1, c2) | 3531 | (c1, c2)) |
| 3535 | register Lisp_Object c1, c2; | 3532 | register Lisp_Object c1, c2; |
| 3536 | { | 3533 | { |
| 3537 | int i1, i2; | 3534 | int i1, i2; |
| @@ -3637,15 +3634,15 @@ transpose_markers (start1, end1, start2, end2, | |||
| 3637 | } | 3634 | } |
| 3638 | 3635 | ||
| 3639 | DEFUN ("transpose-regions", Ftranspose_regions, Stranspose_regions, 4, 5, 0, | 3636 | DEFUN ("transpose-regions", Ftranspose_regions, Stranspose_regions, 4, 5, 0, |
| 3640 | "Transpose region START1 to END1 with START2 to END2.\n\ | 3637 | /* Transpose region START1 to END1 with START2 to END2. |
| 3641 | The regions may not be overlapping, because the size of the buffer is\n\ | 3638 | The regions may not be overlapping, because the size of the buffer is |
| 3642 | never changed in a transposition.\n\ | 3639 | never changed in a transposition. |
| 3643 | \n\ | 3640 | |
| 3644 | Optional fifth arg LEAVE_MARKERS, if non-nil, means don't update\n\ | 3641 | Optional fifth arg LEAVE_MARKERS, if non-nil, means don't update |
| 3645 | any markers that happen to be located in the regions.\n\ | 3642 | any markers that happen to be located in the regions. |
| 3646 | \n\ | 3643 | |
| 3647 | Transposing beyond buffer boundaries is an error.") | 3644 | Transposing beyond buffer boundaries is an error. */ |
| 3648 | (startr1, endr1, startr2, endr2, leave_markers) | 3645 | (startr1, endr1, startr2, endr2, leave_markers)) |
| 3649 | Lisp_Object startr1, endr1, startr2, endr2, leave_markers; | 3646 | Lisp_Object startr1, endr1, startr2, endr2, leave_markers; |
| 3650 | { | 3647 | { |
| 3651 | register int start1, end1, start2, end2; | 3648 | register int start1, end1, start2, end2; |
| @@ -3935,15 +3932,15 @@ syms_of_editfns () | |||
| 3935 | = intern ("buffer-access-fontify-functions"); | 3932 | = intern ("buffer-access-fontify-functions"); |
| 3936 | staticpro (&Qbuffer_access_fontify_functions); | 3933 | staticpro (&Qbuffer_access_fontify_functions); |
| 3937 | 3934 | ||
| 3938 | DEFVAR_LISP ("inhibit-field-text-motion", &Vinhibit_field_text_motion, | 3935 | DEFVAR_LISP ("inhibit-field-text-motion", &Vinhibit_field_text_motion |
| 3939 | "Non-nil means.text motion commands don't notice fields."); | 3936 | /* Non-nil means.text motion commands don't notice fields. */); |
| 3940 | Vinhibit_field_text_motion = Qnil; | 3937 | Vinhibit_field_text_motion = Qnil; |
| 3941 | 3938 | ||
| 3942 | DEFVAR_LISP ("buffer-access-fontify-functions", | 3939 | DEFVAR_LISP ("buffer-access-fontify-functions", |
| 3943 | &Vbuffer_access_fontify_functions, | 3940 | &Vbuffer_access_fontify_functions |
| 3944 | "List of functions called by `buffer-substring' to fontify if necessary.\n\ | 3941 | /* List of functions called by `buffer-substring' to fontify if necessary. |
| 3945 | Each function is called with two arguments which specify the range\n\ | 3942 | Each function is called with two arguments which specify the range |
| 3946 | of the buffer being accessed."); | 3943 | of the buffer being accessed. */); |
| 3947 | Vbuffer_access_fontify_functions = Qnil; | 3944 | Vbuffer_access_fontify_functions = Qnil; |
| 3948 | 3945 | ||
| 3949 | { | 3946 | { |
| @@ -3959,23 +3956,23 @@ of the buffer being accessed."); | |||
| 3959 | } | 3956 | } |
| 3960 | 3957 | ||
| 3961 | DEFVAR_LISP ("buffer-access-fontified-property", | 3958 | DEFVAR_LISP ("buffer-access-fontified-property", |
| 3962 | &Vbuffer_access_fontified_property, | 3959 | &Vbuffer_access_fontified_property |
| 3963 | "Property which (if non-nil) indicates text has been fontified.\n\ | 3960 | /* Property which (if non-nil) indicates text has been fontified. |
| 3964 | `buffer-substring' need not call the `buffer-access-fontify-functions'\n\ | 3961 | `buffer-substring' need not call the `buffer-access-fontify-functions' |
| 3965 | functions if all the text being accessed has this property."); | 3962 | functions if all the text being accessed has this property. */); |
| 3966 | Vbuffer_access_fontified_property = Qnil; | 3963 | Vbuffer_access_fontified_property = Qnil; |
| 3967 | 3964 | ||
| 3968 | DEFVAR_LISP ("system-name", &Vsystem_name, | 3965 | DEFVAR_LISP ("system-name", &Vsystem_name |
| 3969 | "The name of the machine Emacs is running on."); | 3966 | /* The name of the machine Emacs is running on. */); |
| 3970 | 3967 | ||
| 3971 | DEFVAR_LISP ("user-full-name", &Vuser_full_name, | 3968 | DEFVAR_LISP ("user-full-name", &Vuser_full_name |
| 3972 | "The full name of the user logged in."); | 3969 | /* The full name of the user logged in. */); |
| 3973 | 3970 | ||
| 3974 | DEFVAR_LISP ("user-login-name", &Vuser_login_name, | 3971 | DEFVAR_LISP ("user-login-name", &Vuser_login_name |
| 3975 | "The user's name, taken from environment variables if possible."); | 3972 | /* The user's name, taken from environment variables if possible. */); |
| 3976 | 3973 | ||
| 3977 | DEFVAR_LISP ("user-real-login-name", &Vuser_real_login_name, | 3974 | DEFVAR_LISP ("user-real-login-name", &Vuser_real_login_name |
| 3978 | "The user's name, based upon the real uid only."); | 3975 | /* The user's name, based upon the real uid only. */); |
| 3979 | 3976 | ||
| 3980 | defsubr (&Spropertize); | 3977 | defsubr (&Spropertize); |
| 3981 | defsubr (&Schar_equal); | 3978 | defsubr (&Schar_equal); |
diff --git a/src/minibuf.c b/src/minibuf.c index 1f5b423a796..9af0c0b0fe5 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 22 | 22 | ||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #include <stdio.h> | 24 | #include <stdio.h> |
| 25 | #define DOC_STRINGS_IN_COMMENTS | ||
| 25 | #include "lisp.h" | 26 | #include "lisp.h" |
| 26 | #include "commands.h" | 27 | #include "commands.h" |
| 27 | #include "buffer.h" | 28 | #include "buffer.h" |
| @@ -192,10 +193,10 @@ choose_minibuf_frame_1 (ignore) | |||
| 192 | 193 | ||
| 193 | DEFUN ("set-minibuffer-window", Fset_minibuffer_window, | 194 | DEFUN ("set-minibuffer-window", Fset_minibuffer_window, |
| 194 | Sset_minibuffer_window, 1, 1, 0, | 195 | Sset_minibuffer_window, 1, 1, 0, |
| 195 | "Specify which minibuffer window to use for the minibuffer.\n\ | 196 | /* Specify which minibuffer window to use for the minibuffer. |
| 196 | This effects where the minibuffer is displayed if you put text in it\n\ | 197 | This effects where the minibuffer is displayed if you put text in it |
| 197 | without invoking the usual minibuffer commands.") | 198 | without invoking the usual minibuffer commands. */ |
| 198 | (window) | 199 | (window)) |
| 199 | Lisp_Object window; | 200 | Lisp_Object window; |
| 200 | { | 201 | { |
| 201 | CHECK_WINDOW (window, 1); | 202 | CHECK_WINDOW (window, 1); |
| @@ -325,9 +326,9 @@ read_minibuf_noninteractive (map, initial, prompt, backup_n, expflag, | |||
| 325 | 326 | ||
| 326 | DEFUN ("minibuffer-prompt-end", Fminibuffer_prompt_end, | 327 | DEFUN ("minibuffer-prompt-end", Fminibuffer_prompt_end, |
| 327 | Sminibuffer_prompt_end, 0, 0, 0, | 328 | Sminibuffer_prompt_end, 0, 0, 0, |
| 328 | "Return the buffer position of the end of the minibuffer prompt.\n\ | 329 | /* Return the buffer position of the end of the minibuffer prompt. |
| 329 | Return (point-min) if current buffer is not a mini-buffer.") | 330 | Return (point-min) if current buffer is not a mini-buffer. */ |
| 330 | () | 331 | ()) |
| 331 | { | 332 | { |
| 332 | /* This function is written to be most efficient when there's a prompt. */ | 333 | /* This function is written to be most efficient when there's a prompt. */ |
| 333 | Lisp_Object beg = make_number (BEGV); | 334 | Lisp_Object beg = make_number (BEGV); |
| @@ -341,9 +342,9 @@ Return (point-min) if current buffer is not a mini-buffer.") | |||
| 341 | 342 | ||
| 342 | DEFUN ("minibuffer-contents", Fminibuffer_contents, | 343 | DEFUN ("minibuffer-contents", Fminibuffer_contents, |
| 343 | Sminibuffer_contents, 0, 0, 0, | 344 | Sminibuffer_contents, 0, 0, 0, |
| 344 | "Return the user input in a minbuffer as a string.\n\ | 345 | /* Return the user input in a minbuffer as a string. |
| 345 | The current buffer must be a minibuffer.") | 346 | The current buffer must be a minibuffer. */ |
| 346 | () | 347 | ()) |
| 347 | { | 348 | { |
| 348 | int prompt_end = XINT (Fminibuffer_prompt_end ()); | 349 | int prompt_end = XINT (Fminibuffer_prompt_end ()); |
| 349 | return make_buffer_string (prompt_end, ZV, 1); | 350 | return make_buffer_string (prompt_end, ZV, 1); |
| @@ -351,9 +352,9 @@ The current buffer must be a minibuffer.") | |||
| 351 | 352 | ||
| 352 | DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties, | 353 | DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties, |
| 353 | Sminibuffer_contents_no_properties, 0, 0, 0, | 354 | Sminibuffer_contents_no_properties, 0, 0, 0, |
| 354 | "Return the user input in a minbuffer as a string, without text-properties.\n\ | 355 | /* Return the user input in a minbuffer as a string, without text-properties. |
| 355 | The current buffer must be a minibuffer.") | 356 | The current buffer must be a minibuffer. */ |
| 356 | () | 357 | ()) |
| 357 | { | 358 | { |
| 358 | int prompt_end = XINT (Fminibuffer_prompt_end ()); | 359 | int prompt_end = XINT (Fminibuffer_prompt_end ()); |
| 359 | return make_buffer_string (prompt_end, ZV, 0); | 360 | return make_buffer_string (prompt_end, ZV, 0); |
| @@ -361,9 +362,9 @@ The current buffer must be a minibuffer.") | |||
| 361 | 362 | ||
| 362 | DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents, | 363 | DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents, |
| 363 | Sdelete_minibuffer_contents, 0, 0, 0, | 364 | Sdelete_minibuffer_contents, 0, 0, 0, |
| 364 | "Delete all user input in a minibuffer.\n\ | 365 | /* Delete all user input in a minibuffer. |
| 365 | The current buffer must be a minibuffer.") | 366 | The current buffer must be a minibuffer. */ |
| 366 | () | 367 | ()) |
| 367 | { | 368 | { |
| 368 | int prompt_end = XINT (Fminibuffer_prompt_end ()); | 369 | int prompt_end = XINT (Fminibuffer_prompt_end ()); |
| 369 | if (prompt_end < ZV) | 370 | if (prompt_end < ZV) |
| @@ -845,8 +846,33 @@ If the variable `minibuffer-allow-text-properties' is non-nil,\n\ | |||
| 845 | */ | 846 | */ |
| 846 | 847 | ||
| 847 | DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0, | 848 | DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0, |
| 848 | 0 /* See immediately above */) | 849 | /* Read a string from the minibuffer, prompting with string PROMPT. |
| 849 | (prompt, initial_contents, keymap, read, hist, default_value, inherit_input_method) | 850 | If optional second arg INITIAL-CONTENTS is non-nil, it is a string |
| 851 | to be inserted into the minibuffer before reading input. | ||
| 852 | If INITIAL-CONTENTS is (STRING . POSITION), the initial input | ||
| 853 | is STRING, but point is placed at position POSITION in the minibuffer. | ||
| 854 | Third arg KEYMAP is a keymap to use whilst reading; | ||
| 855 | if omitted or nil, the default is `minibuffer-local-map'. | ||
| 856 | If fourth arg READ is non-nil, then interpret the result as a lisp object | ||
| 857 | and return that object: | ||
| 858 | in other words, do `(car (read-from-string INPUT-STRING))' | ||
| 859 | Fifth arg HIST, if non-nil, specifies a history list | ||
| 860 | and optionally the initial position in the list. | ||
| 861 | It can be a symbol, which is the history list variable to use, | ||
| 862 | or it can be a cons cell (HISTVAR . HISTPOS). | ||
| 863 | In that case, HISTVAR is the history list variable to use, | ||
| 864 | and HISTPOS is the initial position (the position in the list | ||
| 865 | which INITIAL-CONTENTS corresponds to). | ||
| 866 | Positions are counted starting from 1 at the beginning of the list. | ||
| 867 | Sixth arg DEFAULT-VALUE is the default value. If non-nil, it is available | ||
| 868 | for history commands; but `read-from-minibuffer' does NOT return DEFAULT-VALUE | ||
| 869 | if the user enters empty input! It returns the empty string. | ||
| 870 | Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits | ||
| 871 | the current input method and the setting of enable-multibyte-characters. | ||
| 872 | If the variable `minibuffer-allow-text-properties' is non-nil, | ||
| 873 | then the string which is returned includes whatever text properties | ||
| 874 | were present in the minibuffer. Otherwise the value has no text properties. */ | ||
| 875 | (prompt, initial_contents, keymap, read, hist, default_value, inherit_input_method)) | ||
| 850 | Lisp_Object prompt, initial_contents, keymap, read, hist, default_value; | 876 | Lisp_Object prompt, initial_contents, keymap, read, hist, default_value; |
| 851 | Lisp_Object inherit_input_method; | 877 | Lisp_Object inherit_input_method; |
| 852 | { | 878 | { |
| @@ -908,10 +934,10 @@ DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, | |||
| 908 | } | 934 | } |
| 909 | 935 | ||
| 910 | DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, | 936 | DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, |
| 911 | "Return a Lisp object read using the minibuffer.\n\ | 937 | /* Return a Lisp object read using the minibuffer. |
| 912 | Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS\n\ | 938 | Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS |
| 913 | is a string to insert in the minibuffer before reading.") | 939 | is a string to insert in the minibuffer before reading. */ |
| 914 | (prompt, initial_contents) | 940 | (prompt, initial_contents)) |
| 915 | Lisp_Object prompt, initial_contents; | 941 | Lisp_Object prompt, initial_contents; |
| 916 | { | 942 | { |
| 917 | CHECK_STRING (prompt, 0); | 943 | CHECK_STRING (prompt, 0); |
| @@ -923,10 +949,10 @@ is a string to insert in the minibuffer before reading.") | |||
| 923 | } | 949 | } |
| 924 | 950 | ||
| 925 | DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, | 951 | DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, |
| 926 | "Return value of Lisp expression read using the minibuffer.\n\ | 952 | /* Return value of Lisp expression read using the minibuffer. |
| 927 | Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS\n\ | 953 | Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS |
| 928 | is a string to insert in the minibuffer before reading.") | 954 | is a string to insert in the minibuffer before reading. */ |
| 929 | (prompt, initial_contents) | 955 | (prompt, initial_contents)) |
| 930 | Lisp_Object prompt, initial_contents; | 956 | Lisp_Object prompt, initial_contents; |
| 931 | { | 957 | { |
| 932 | return Feval (Fread_minibuffer (prompt, initial_contents)); | 958 | return Feval (Fread_minibuffer (prompt, initial_contents)); |
| @@ -935,17 +961,17 @@ is a string to insert in the minibuffer before reading.") | |||
| 935 | /* Functions that use the minibuffer to read various things. */ | 961 | /* Functions that use the minibuffer to read various things. */ |
| 936 | 962 | ||
| 937 | DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, | 963 | DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, |
| 938 | "Read a string from the minibuffer, prompting with string PROMPT.\n\ | 964 | /* Read a string from the minibuffer, prompting with string PROMPT. |
| 939 | If non-nil, second arg INITIAL-INPUT is a string to insert before reading.\n\ | 965 | If non-nil, second arg INITIAL-INPUT is a string to insert before reading. |
| 940 | The third arg HISTORY, if non-nil, specifies a history list\n\ | 966 | The third arg HISTORY, if non-nil, specifies a history list |
| 941 | and optionally the initial position in the list.\n\ | 967 | and optionally the initial position in the list. |
| 942 | See `read-from-minibuffer' for details of HISTORY argument.\n\ | 968 | See `read-from-minibuffer' for details of HISTORY argument. |
| 943 | Fourth arg DEFAULT-VALUE is the default value. If non-nil, it is used\n\ | 969 | Fourth arg DEFAULT-VALUE is the default value. If non-nil, it is used |
| 944 | for history commands, and as the value to return if the user enters\n\ | 970 | for history commands, and as the value to return if the user enters |
| 945 | the empty string.\n\ | 971 | the empty string. |
| 946 | Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits\n\ | 972 | Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits |
| 947 | the current input method and the setting of enable-multibyte-characters.") | 973 | the current input method and the setting of enable-multibyte-characters. */ |
| 948 | (prompt, initial_input, history, default_value, inherit_input_method) | 974 | (prompt, initial_input, history, default_value, inherit_input_method)) |
| 949 | Lisp_Object prompt, initial_input, history, default_value; | 975 | Lisp_Object prompt, initial_input, history, default_value; |
| 950 | Lisp_Object inherit_input_method; | 976 | Lisp_Object inherit_input_method; |
| 951 | { | 977 | { |
| @@ -959,11 +985,11 @@ Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits\n\ | |||
| 959 | } | 985 | } |
| 960 | 986 | ||
| 961 | DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 1, 3, 0, | 987 | DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 1, 3, 0, |
| 962 | "Read a string from the terminal, not allowing blanks.\n\ | 988 | /* Read a string from the terminal, not allowing blanks. |
| 963 | Prompt with PROMPT, and provide INITIAL as an initial value of the input string.\n\ | 989 | Prompt with PROMPT, and provide INITIAL as an initial value of the input string. |
| 964 | Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits\n\ | 990 | Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits |
| 965 | the current input method and the setting of enable-multibyte-characters.") | 991 | the current input method and the setting of enable-multibyte-characters. */ |
| 966 | (prompt, initial, inherit_input_method) | 992 | (prompt, initial, inherit_input_method)) |
| 967 | Lisp_Object prompt, initial, inherit_input_method; | 993 | Lisp_Object prompt, initial, inherit_input_method; |
| 968 | { | 994 | { |
| 969 | CHECK_STRING (prompt, 0); | 995 | CHECK_STRING (prompt, 0); |
| @@ -976,9 +1002,9 @@ the current input method and the setting of enable-multibyte-characters.") | |||
| 976 | } | 1002 | } |
| 977 | 1003 | ||
| 978 | DEFUN ("read-command", Fread_command, Sread_command, 1, 2, 0, | 1004 | DEFUN ("read-command", Fread_command, Sread_command, 1, 2, 0, |
| 979 | "Read the name of a command and return as a symbol.\n\ | 1005 | /* Read the name of a command and return as a symbol. |
| 980 | Prompts with PROMPT. By default, return DEFAULT-VALUE.") | 1006 | Prompts with PROMPT. By default, return DEFAULT-VALUE. */ |
| 981 | (prompt, default_value) | 1007 | (prompt, default_value)) |
| 982 | Lisp_Object prompt, default_value; | 1008 | Lisp_Object prompt, default_value; |
| 983 | { | 1009 | { |
| 984 | Lisp_Object name, default_string; | 1010 | Lisp_Object name, default_string; |
| @@ -999,9 +1025,9 @@ Prompts with PROMPT. By default, return DEFAULT-VALUE.") | |||
| 999 | 1025 | ||
| 1000 | #ifdef NOTDEF | 1026 | #ifdef NOTDEF |
| 1001 | DEFUN ("read-function", Fread_function, Sread_function, 1, 1, 0, | 1027 | DEFUN ("read-function", Fread_function, Sread_function, 1, 1, 0, |
| 1002 | "One arg PROMPT, a string. Read the name of a function and return as a symbol.\n\ | 1028 | /* One arg PROMPT, a string. Read the name of a function and return as a symbol. |
| 1003 | Prompts with PROMPT.") | 1029 | Prompts with PROMPT. */ |
| 1004 | (prompt) | 1030 | (prompt)) |
| 1005 | Lisp_Object prompt; | 1031 | Lisp_Object prompt; |
| 1006 | { | 1032 | { |
| 1007 | return Fintern (Fcompleting_read (prompt, Vobarray, Qfboundp, Qt, Qnil, Qnil, Qnil, Qnil), | 1033 | return Fintern (Fcompleting_read (prompt, Vobarray, Qfboundp, Qt, Qnil, Qnil, Qnil, Qnil), |
| @@ -1010,10 +1036,10 @@ Prompts with PROMPT.") | |||
| 1010 | #endif /* NOTDEF */ | 1036 | #endif /* NOTDEF */ |
| 1011 | 1037 | ||
| 1012 | DEFUN ("read-variable", Fread_variable, Sread_variable, 1, 2, 0, | 1038 | DEFUN ("read-variable", Fread_variable, Sread_variable, 1, 2, 0, |
| 1013 | "Read the name of a user variable and return it as a symbol.\n\ | 1039 | /* Read the name of a user variable and return it as a symbol. |
| 1014 | Prompts with PROMPT. By default, return DEFAULT-VALUE.\n\ | 1040 | Prompts with PROMPT. By default, return DEFAULT-VALUE. |
| 1015 | A user variable is one whose documentation starts with a `*' character.") | 1041 | A user variable is one whose documentation starts with a `*' character. */ |
| 1016 | (prompt, default_value) | 1042 | (prompt, default_value)) |
| 1017 | Lisp_Object prompt, default_value; | 1043 | Lisp_Object prompt, default_value; |
| 1018 | { | 1044 | { |
| 1019 | Lisp_Object name, default_string; | 1045 | Lisp_Object name, default_string; |
| @@ -1034,11 +1060,11 @@ A user variable is one whose documentation starts with a `*' character.") | |||
| 1034 | } | 1060 | } |
| 1035 | 1061 | ||
| 1036 | DEFUN ("read-buffer", Fread_buffer, Sread_buffer, 1, 3, 0, | 1062 | DEFUN ("read-buffer", Fread_buffer, Sread_buffer, 1, 3, 0, |
| 1037 | "One arg PROMPT, a string. Read the name of a buffer and return as a string.\n\ | 1063 | /* One arg PROMPT, a string. Read the name of a buffer and return as a string. |
| 1038 | Prompts with PROMPT.\n\ | 1064 | Prompts with PROMPT. |
| 1039 | Optional second arg DEF is value to return if user enters an empty line.\n\ | 1065 | Optional second arg DEF is value to return if user enters an empty line. |
| 1040 | If optional third arg REQUIRE-MATCH is non-nil, only existing buffer names are allowed.") | 1066 | If optional third arg REQUIRE-MATCH is non-nil, only existing buffer names are allowed. */ |
| 1041 | (prompt, def, require_match) | 1067 | (prompt, def, require_match)) |
| 1042 | Lisp_Object prompt, def, require_match; | 1068 | Lisp_Object prompt, def, require_match; |
| 1043 | { | 1069 | { |
| 1044 | Lisp_Object args[4]; | 1070 | Lisp_Object args[4]; |
| @@ -1084,28 +1110,28 @@ minibuf_conform_representation (string, basis) | |||
| 1084 | } | 1110 | } |
| 1085 | 1111 | ||
| 1086 | DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0, | 1112 | DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0, |
| 1087 | "Return common substring of all completions of STRING in ALIST.\n\ | 1113 | /* Return common substring of all completions of STRING in ALIST. |
| 1088 | Each car of each element of ALIST is tested to see if it begins with STRING.\n\ | 1114 | Each car of each element of ALIST is tested to see if it begins with STRING. |
| 1089 | All that match are compared together; the longest initial sequence\n\ | 1115 | All that match are compared together; the longest initial sequence |
| 1090 | common to all matches is returned as a string.\n\ | 1116 | common to all matches is returned as a string. |
| 1091 | If there is no match at all, nil is returned.\n\ | 1117 | If there is no match at all, nil is returned. |
| 1092 | For a unique match which is exact, t is returned.\n\ | 1118 | For a unique match which is exact, t is returned. |
| 1093 | \n\ | 1119 | |
| 1094 | ALIST can be an obarray instead of an alist.\n\ | 1120 | ALIST can be an obarray instead of an alist. |
| 1095 | Then the print names of all symbols in the obarray are the possible matches.\n\ | 1121 | Then the print names of all symbols in the obarray are the possible matches. |
| 1096 | \n\ | 1122 | |
| 1097 | ALIST can also be a function to do the completion itself.\n\ | 1123 | ALIST can also be a function to do the completion itself. |
| 1098 | It receives three arguments: the values STRING, PREDICATE and nil.\n\ | 1124 | It receives three arguments: the values STRING, PREDICATE and nil. |
| 1099 | Whatever it returns becomes the value of `try-completion'.\n\ | 1125 | Whatever it returns becomes the value of `try-completion'. |
| 1100 | \n\ | 1126 | |
| 1101 | If optional third argument PREDICATE is non-nil,\n\ | 1127 | If optional third argument PREDICATE is non-nil, |
| 1102 | it is used to test each possible match.\n\ | 1128 | it is used to test each possible match. |
| 1103 | The match is a candidate only if PREDICATE returns non-nil.\n\ | 1129 | The match is a candidate only if PREDICATE returns non-nil. |
| 1104 | The argument given to PREDICATE is the alist element\n\ | 1130 | The argument given to PREDICATE is the alist element |
| 1105 | or the symbol from the obarray.\n\ | 1131 | or the symbol from the obarray. |
| 1106 | Additionally to this predicate, `completion-regexp-list'\n\ | 1132 | Additionally to this predicate, `completion-regexp-list' |
| 1107 | is used to further constrain the set of candidates.") | 1133 | is used to further constrain the set of candidates. */ |
| 1108 | (string, alist, predicate) | 1134 | (string, alist, predicate)) |
| 1109 | Lisp_Object string, alist, predicate; | 1135 | Lisp_Object string, alist, predicate; |
| 1110 | { | 1136 | { |
| 1111 | Lisp_Object bestmatch, tail, elt, eltstring; | 1137 | Lisp_Object bestmatch, tail, elt, eltstring; |
| @@ -1335,29 +1361,29 @@ scmp (s1, s2, len) | |||
| 1335 | } | 1361 | } |
| 1336 | 1362 | ||
| 1337 | DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0, | 1363 | DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0, |
| 1338 | "Search for partial matches to STRING in ALIST.\n\ | 1364 | /* Search for partial matches to STRING in ALIST. |
| 1339 | Each car of each element of ALIST is tested to see if it begins with STRING.\n\ | 1365 | Each car of each element of ALIST is tested to see if it begins with STRING. |
| 1340 | The value is a list of all the strings from ALIST that match.\n\ | 1366 | The value is a list of all the strings from ALIST that match. |
| 1341 | \n\ | 1367 | |
| 1342 | ALIST can be an obarray instead of an alist.\n\ | 1368 | ALIST can be an obarray instead of an alist. |
| 1343 | Then the print names of all symbols in the obarray are the possible matches.\n\ | 1369 | Then the print names of all symbols in the obarray are the possible matches. |
| 1344 | \n\ | 1370 | |
| 1345 | ALIST can also be a function to do the completion itself.\n\ | 1371 | ALIST can also be a function to do the completion itself. |
| 1346 | It receives three arguments: the values STRING, PREDICATE and t.\n\ | 1372 | It receives three arguments: the values STRING, PREDICATE and t. |
| 1347 | Whatever it returns becomes the value of `all-completions'.\n\ | 1373 | Whatever it returns becomes the value of `all-completions'. |
| 1348 | \n\ | 1374 | |
| 1349 | If optional third argument PREDICATE is non-nil,\n\ | 1375 | If optional third argument PREDICATE is non-nil, |
| 1350 | it is used to test each possible match.\n\ | 1376 | it is used to test each possible match. |
| 1351 | The match is a candidate only if PREDICATE returns non-nil.\n\ | 1377 | The match is a candidate only if PREDICATE returns non-nil. |
| 1352 | The argument given to PREDICATE is the alist element\n\ | 1378 | The argument given to PREDICATE is the alist element |
| 1353 | or the symbol from the obarray.\n\ | 1379 | or the symbol from the obarray. |
| 1354 | Additionally to this predicate, `completion-regexp-list'\n\ | 1380 | Additionally to this predicate, `completion-regexp-list' |
| 1355 | is used to further constrain the set of candidates.\n\ | 1381 | is used to further constrain the set of candidates. |
| 1356 | \n\ | 1382 | |
| 1357 | If the optional fourth argument HIDE-SPACES is non-nil,\n\ | 1383 | If the optional fourth argument HIDE-SPACES is non-nil, |
| 1358 | strings in ALIST that start with a space\n\ | 1384 | strings in ALIST that start with a space |
| 1359 | are ignored unless STRING itself starts with a space.") | 1385 | are ignored unless STRING itself starts with a space. */ |
| 1360 | (string, alist, predicate, hide_spaces) | 1386 | (string, alist, predicate, hide_spaces)) |
| 1361 | Lisp_Object string, alist, predicate, hide_spaces; | 1387 | Lisp_Object string, alist, predicate, hide_spaces; |
| 1362 | { | 1388 | { |
| 1363 | Lisp_Object tail, elt, eltstring; | 1389 | Lisp_Object tail, elt, eltstring; |
| @@ -1479,48 +1505,41 @@ Lisp_Object Vminibuffer_completion_predicate, Qminibuffer_completion_predicate; | |||
| 1479 | Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm; | 1505 | Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm; |
| 1480 | Lisp_Object Vminibuffer_completing_file_name; | 1506 | Lisp_Object Vminibuffer_completing_file_name; |
| 1481 | 1507 | ||
| 1482 | /* This comment supplies the doc string for completing-read, | ||
| 1483 | for make-docfile to see. We cannot put this in the real DEFUN | ||
| 1484 | due to limits in the Unix cpp. | ||
| 1485 | |||
| 1486 | DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, | ||
| 1487 | "Read a string in the minibuffer, with completion.\n\ | ||
| 1488 | PROMPT is a string to prompt with; normally it ends in a colon and a space.\n\ | ||
| 1489 | TABLE is an alist whose elements' cars are strings, or an obarray.\n\ | ||
| 1490 | TABLE can also be a function to do the completion itself.\n\ | ||
| 1491 | PREDICATE limits completion to a subset of TABLE.\n\ | ||
| 1492 | See `try-completion' and `all-completions' for more details\n\ | ||
| 1493 | on completion, TABLE, and PREDICATE.\n\ | ||
| 1494 | \n\ | ||
| 1495 | If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless\n\ | ||
| 1496 | the input is (or completes to) an element of TABLE or is null.\n\ | ||
| 1497 | If it is also not t, Return does not exit if it does non-null completion.\n\ | ||
| 1498 | If the input is null, `completing-read' returns an empty string,\n\ | ||
| 1499 | regardless of the value of REQUIRE-MATCH.\n\ | ||
| 1500 | \n\ | ||
| 1501 | If INITIAL-INPUT is non-nil, insert it in the minibuffer initially.\n\ | ||
| 1502 | If it is (STRING . POSITION), the initial input\n\ | ||
| 1503 | is STRING, but point is placed POSITION characters into the string.\n\ | ||
| 1504 | This feature is deprecated--it is best to pass nil for INITIAL.\n\ | ||
| 1505 | HIST, if non-nil, specifies a history list\n\ | ||
| 1506 | and optionally the initial position in the list.\n\ | ||
| 1507 | It can be a symbol, which is the history list variable to use,\n\ | ||
| 1508 | or it can be a cons cell (HISTVAR . HISTPOS).\n\ | ||
| 1509 | In that case, HISTVAR is the history list variable to use,\n\ | ||
| 1510 | and HISTPOS is the initial position (the position in the list\n\ | ||
| 1511 | which INITIAL-INPUT corresponds to).\n\ | ||
| 1512 | Positions are counted starting from 1 at the beginning of the list.\n\ | ||
| 1513 | DEF, if non-nil, is the default value.\n\ | ||
| 1514 | \n\ | ||
| 1515 | If INHERIT-INPUT-METHOD is non-nil, the minibuffer inherits\n\ | ||
| 1516 | the current input method and the setting of enable-multibyte-characters.\n\ | ||
| 1517 | \n\ | ||
| 1518 | Completion ignores case if the ambient value of\n\ | ||
| 1519 | `completion-ignore-case' is non-nil." | ||
| 1520 | */ | ||
| 1521 | DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, | 1508 | DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, |
| 1522 | 0 /* See immediately above */) | 1509 | /* Read a string in the minibuffer, with completion. |
| 1523 | (prompt, table, predicate, require_match, initial_input, hist, def, inherit_input_method) | 1510 | PROMPT is a string to prompt with; normally it ends in a colon and a space. |
| 1511 | TABLE is an alist whose elements' cars are strings, or an obarray. | ||
| 1512 | TABLE can also be a function to do the completion itself. | ||
| 1513 | PREDICATE limits completion to a subset of TABLE. | ||
| 1514 | See `try-completion' and `all-completions' for more details | ||
| 1515 | on completion, TABLE, and PREDICATE. | ||
| 1516 | |||
| 1517 | If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless | ||
| 1518 | the input is (or completes to) an element of TABLE or is null. | ||
| 1519 | If it is also not t, Return does not exit if it does non-null completion. | ||
| 1520 | If the input is null, `completing-read' returns an empty string, | ||
| 1521 | regardless of the value of REQUIRE-MATCH. | ||
| 1522 | |||
| 1523 | If INITIAL-INPUT is non-nil, insert it in the minibuffer initially. | ||
| 1524 | If it is (STRING . POSITION), the initial input | ||
| 1525 | is STRING, but point is placed POSITION characters into the string. | ||
| 1526 | This feature is deprecated--it is best to pass nil for INITIAL. | ||
| 1527 | HIST, if non-nil, specifies a history list | ||
| 1528 | and optionally the initial position in the list. | ||
| 1529 | It can be a symbol, which is the history list variable to use, | ||
| 1530 | or it can be a cons cell (HISTVAR . HISTPOS). | ||
| 1531 | In that case, HISTVAR is the history list variable to use, | ||
| 1532 | and HISTPOS is the initial position (the position in the list | ||
| 1533 | which INITIAL-INPUT corresponds to). | ||
| 1534 | Positions are counted starting from 1 at the beginning of the list. | ||
| 1535 | DEF, if non-nil, is the default value. | ||
| 1536 | |||
| 1537 | If INHERIT-INPUT-METHOD is non-nil, the minibuffer inherits | ||
| 1538 | the current input method and the setting of enable-multibyte-characters. | ||
| 1539 | |||
| 1540 | Completion ignores case if the ambient value of | ||
| 1541 | `completion-ignore-case' is non-nil. */ | ||
| 1542 | (prompt, table, predicate, require_match, initial_input, hist, def, inherit_input_method)) | ||
| 1524 | Lisp_Object prompt, table, predicate, require_match, initial_input; | 1543 | Lisp_Object prompt, table, predicate, require_match, initial_input; |
| 1525 | Lisp_Object hist, def, inherit_input_method; | 1544 | Lisp_Object hist, def, inherit_input_method; |
| 1526 | { | 1545 | { |
| @@ -1755,12 +1774,12 @@ assoc_for_completion (key, list) | |||
| 1755 | } | 1774 | } |
| 1756 | 1775 | ||
| 1757 | DEFUN ("minibuffer-complete", Fminibuffer_complete, Sminibuffer_complete, 0, 0, "", | 1776 | DEFUN ("minibuffer-complete", Fminibuffer_complete, Sminibuffer_complete, 0, 0, "", |
| 1758 | "Complete the minibuffer contents as far as possible.\n\ | 1777 | /* Complete the minibuffer contents as far as possible. |
| 1759 | Return nil if there is no valid completion, else t.\n\ | 1778 | Return nil if there is no valid completion, else t. |
| 1760 | If no characters can be completed, display a list of possible completions.\n\ | 1779 | If no characters can be completed, display a list of possible completions. |
| 1761 | If you repeat this command after it displayed such a list,\n\ | 1780 | If you repeat this command after it displayed such a list, |
| 1762 | scroll the window of possible completions.") | 1781 | scroll the window of possible completions. */ |
| 1763 | () | 1782 | ()) |
| 1764 | { | 1783 | { |
| 1765 | register int i; | 1784 | register int i; |
| 1766 | Lisp_Object window, tem; | 1785 | Lisp_Object window, tem; |
| @@ -1835,10 +1854,10 @@ complete_and_exit_2 (ignore) | |||
| 1835 | 1854 | ||
| 1836 | DEFUN ("minibuffer-complete-and-exit", Fminibuffer_complete_and_exit, | 1855 | DEFUN ("minibuffer-complete-and-exit", Fminibuffer_complete_and_exit, |
| 1837 | Sminibuffer_complete_and_exit, 0, 0, "", | 1856 | Sminibuffer_complete_and_exit, 0, 0, "", |
| 1838 | "If the minibuffer contents is a valid completion then exit.\n\ | 1857 | /* If the minibuffer contents is a valid completion then exit. |
| 1839 | Otherwise try to complete it. If completion leads to a valid completion,\n\ | 1858 | Otherwise try to complete it. If completion leads to a valid completion, |
| 1840 | a repetition of this command will exit.") | 1859 | a repetition of this command will exit. */ |
| 1841 | () | 1860 | ()) |
| 1842 | { | 1861 | { |
| 1843 | register int i; | 1862 | register int i; |
| 1844 | Lisp_Object val; | 1863 | Lisp_Object val; |
| @@ -1880,11 +1899,11 @@ a repetition of this command will exit.") | |||
| 1880 | 1899 | ||
| 1881 | DEFUN ("minibuffer-complete-word", Fminibuffer_complete_word, Sminibuffer_complete_word, | 1900 | DEFUN ("minibuffer-complete-word", Fminibuffer_complete_word, Sminibuffer_complete_word, |
| 1882 | 0, 0, "", | 1901 | 0, 0, "", |
| 1883 | "Complete the minibuffer contents at most a single word.\n\ | 1902 | /* Complete the minibuffer contents at most a single word. |
| 1884 | After one word is completed as much as possible, a space or hyphen\n\ | 1903 | After one word is completed as much as possible, a space or hyphen |
| 1885 | is added, provided that matches some possible completion.\n\ | 1904 | is added, provided that matches some possible completion. |
| 1886 | Return nil if there is no valid completion, else t.") | 1905 | Return nil if there is no valid completion, else t. */ |
| 1887 | () | 1906 | ()) |
| 1888 | { | 1907 | { |
| 1889 | Lisp_Object completion, tem, tem1; | 1908 | Lisp_Object completion, tem, tem1; |
| 1890 | register int i, i_byte; | 1909 | register int i, i_byte; |
| @@ -2053,15 +2072,15 @@ Return nil if there is no valid completion, else t.") | |||
| 2053 | 2072 | ||
| 2054 | DEFUN ("display-completion-list", Fdisplay_completion_list, Sdisplay_completion_list, | 2073 | DEFUN ("display-completion-list", Fdisplay_completion_list, Sdisplay_completion_list, |
| 2055 | 1, 1, 0, | 2074 | 1, 1, 0, |
| 2056 | "Display the list of completions, COMPLETIONS, using `standard-output'.\n\ | 2075 | /* Display the list of completions, COMPLETIONS, using `standard-output'. |
| 2057 | Each element may be just a symbol or string\n\ | 2076 | Each element may be just a symbol or string |
| 2058 | or may be a list of two strings to be printed as if concatenated.\n\ | 2077 | or may be a list of two strings to be printed as if concatenated. |
| 2059 | `standard-output' must be a buffer.\n\ | 2078 | `standard-output' must be a buffer. |
| 2060 | The actual completion alternatives, as inserted, are given `mouse-face'\n\ | 2079 | The actual completion alternatives, as inserted, are given `mouse-face' |
| 2061 | properties of `highlight'.\n\ | 2080 | properties of `highlight'. |
| 2062 | At the end, this runs the normal hook `completion-setup-hook'.\n\ | 2081 | At the end, this runs the normal hook `completion-setup-hook'. |
| 2063 | It can find the completion buffer in `standard-output'.") | 2082 | It can find the completion buffer in `standard-output'. */ |
| 2064 | (completions) | 2083 | (completions)) |
| 2065 | Lisp_Object completions; | 2084 | Lisp_Object completions; |
| 2066 | { | 2085 | { |
| 2067 | Lisp_Object tail, elt; | 2086 | Lisp_Object tail, elt; |
| @@ -2236,8 +2255,8 @@ It can find the completion buffer in `standard-output'.") | |||
| 2236 | 2255 | ||
| 2237 | DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_completion_help, | 2256 | DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_completion_help, |
| 2238 | 0, 0, "", | 2257 | 0, 0, "", |
| 2239 | "Display a list of possible completions of the current minibuffer contents.") | 2258 | /* Display a list of possible completions of the current minibuffer contents. */ |
| 2240 | () | 2259 | ()) |
| 2241 | { | 2260 | { |
| 2242 | Lisp_Object completions; | 2261 | Lisp_Object completions; |
| 2243 | 2262 | ||
| @@ -2261,8 +2280,8 @@ DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_co | |||
| 2261 | } | 2280 | } |
| 2262 | 2281 | ||
| 2263 | DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0, 0, "", | 2282 | DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0, 0, "", |
| 2264 | "Terminate minibuffer input.") | 2283 | /* Terminate minibuffer input. */ |
| 2265 | () | 2284 | ()) |
| 2266 | { | 2285 | { |
| 2267 | if (INTEGERP (last_command_char)) | 2286 | if (INTEGERP (last_command_char)) |
| 2268 | internal_self_insert (XINT (last_command_char), 0); | 2287 | internal_self_insert (XINT (last_command_char), 0); |
| @@ -2273,23 +2292,23 @@ DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0, | |||
| 2273 | } | 2292 | } |
| 2274 | 2293 | ||
| 2275 | DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "", | 2294 | DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "", |
| 2276 | "Terminate this minibuffer argument.") | 2295 | /* Terminate this minibuffer argument. */ |
| 2277 | () | 2296 | ()) |
| 2278 | { | 2297 | { |
| 2279 | return Fthrow (Qexit, Qnil); | 2298 | return Fthrow (Qexit, Qnil); |
| 2280 | } | 2299 | } |
| 2281 | 2300 | ||
| 2282 | DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0, | 2301 | DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0, |
| 2283 | "Return current depth of activations of minibuffer, a nonnegative integer.") | 2302 | /* Return current depth of activations of minibuffer, a nonnegative integer. */ |
| 2284 | () | 2303 | ()) |
| 2285 | { | 2304 | { |
| 2286 | return make_number (minibuf_level); | 2305 | return make_number (minibuf_level); |
| 2287 | } | 2306 | } |
| 2288 | 2307 | ||
| 2289 | DEFUN ("minibuffer-prompt", Fminibuffer_prompt, Sminibuffer_prompt, 0, 0, 0, | 2308 | DEFUN ("minibuffer-prompt", Fminibuffer_prompt, Sminibuffer_prompt, 0, 0, 0, |
| 2290 | "Return the prompt string of the currently-active minibuffer.\n\ | 2309 | /* Return the prompt string of the currently-active minibuffer. |
| 2291 | If no minibuffer is active, return nil.") | 2310 | If no minibuffer is active, return nil. */ |
| 2292 | () | 2311 | ()) |
| 2293 | { | 2312 | { |
| 2294 | return Fcopy_sequence (minibuf_prompt); | 2313 | return Fcopy_sequence (minibuf_prompt); |
| 2295 | } | 2314 | } |
| @@ -2332,10 +2351,10 @@ temp_echo_area_glyphs (m) | |||
| 2332 | 2351 | ||
| 2333 | DEFUN ("minibuffer-message", Fminibuffer_message, Sminibuffer_message, | 2352 | DEFUN ("minibuffer-message", Fminibuffer_message, Sminibuffer_message, |
| 2334 | 1, 1, 0, | 2353 | 1, 1, 0, |
| 2335 | "Temporarily display STRING at the end of the minibuffer.\n\ | 2354 | /* Temporarily display STRING at the end of the minibuffer. |
| 2336 | The text is displayed for two seconds,\n\ | 2355 | The text is displayed for two seconds, |
| 2337 | or until the next input event arrives, whichever comes first.") | 2356 | or until the next input event arrives, whichever comes first. */ |
| 2338 | (string) | 2357 | (string)) |
| 2339 | Lisp_Object string; | 2358 | Lisp_Object string; |
| 2340 | { | 2359 | { |
| 2341 | temp_echo_area_glyphs (XSTRING (string)->data); | 2360 | temp_echo_area_glyphs (XSTRING (string)->data); |
| @@ -2406,102 +2425,102 @@ syms_of_minibuf () | |||
| 2406 | Qactivate_input_method = intern ("activate-input-method"); | 2425 | Qactivate_input_method = intern ("activate-input-method"); |
| 2407 | staticpro (&Qactivate_input_method); | 2426 | staticpro (&Qactivate_input_method); |
| 2408 | 2427 | ||
| 2409 | DEFVAR_LISP ("read-buffer-function", &Vread_buffer_function, | 2428 | DEFVAR_LISP ("read-buffer-function", &Vread_buffer_function |
| 2410 | "If this is non-nil, `read-buffer' does its work by calling this function."); | 2429 | /* If this is non-nil, `read-buffer' does its work by calling this function. */); |
| 2411 | Vread_buffer_function = Qnil; | 2430 | Vread_buffer_function = Qnil; |
| 2412 | 2431 | ||
| 2413 | DEFVAR_LISP ("minibuffer-setup-hook", &Vminibuffer_setup_hook, | 2432 | DEFVAR_LISP ("minibuffer-setup-hook", &Vminibuffer_setup_hook |
| 2414 | "Normal hook run just after entry to minibuffer."); | 2433 | /* Normal hook run just after entry to minibuffer. */); |
| 2415 | Vminibuffer_setup_hook = Qnil; | 2434 | Vminibuffer_setup_hook = Qnil; |
| 2416 | 2435 | ||
| 2417 | DEFVAR_LISP ("minibuffer-exit-hook", &Vminibuffer_exit_hook, | 2436 | DEFVAR_LISP ("minibuffer-exit-hook", &Vminibuffer_exit_hook |
| 2418 | "Normal hook run just after exit from minibuffer."); | 2437 | /* Normal hook run just after exit from minibuffer. */); |
| 2419 | Vminibuffer_exit_hook = Qnil; | 2438 | Vminibuffer_exit_hook = Qnil; |
| 2420 | 2439 | ||
| 2421 | DEFVAR_LISP ("history-length", &Vhistory_length, | 2440 | DEFVAR_LISP ("history-length", &Vhistory_length |
| 2422 | "*Maximum length for history lists before truncation takes place.\n\ | 2441 | /* *Maximum length for history lists before truncation takes place. |
| 2423 | A number means that length; t means infinite. Truncation takes place\n\ | 2442 | A number means that length; t means infinite. Truncation takes place |
| 2424 | just after a new element is inserted. Setting the history-length\n\ | 2443 | just after a new element is inserted. Setting the history-length |
| 2425 | property of a history variable overrides this default."); | 2444 | property of a history variable overrides this default. */); |
| 2426 | XSETFASTINT (Vhistory_length, 30); | 2445 | XSETFASTINT (Vhistory_length, 30); |
| 2427 | 2446 | ||
| 2428 | DEFVAR_LISP ("completion-auto-help", &Vcompletion_auto_help, | 2447 | DEFVAR_LISP ("completion-auto-help", &Vcompletion_auto_help |
| 2429 | "*Non-nil means automatically provide help for invalid completion input."); | 2448 | /* *Non-nil means automatically provide help for invalid completion input. */); |
| 2430 | Vcompletion_auto_help = Qt; | 2449 | Vcompletion_auto_help = Qt; |
| 2431 | 2450 | ||
| 2432 | DEFVAR_BOOL ("completion-ignore-case", &completion_ignore_case, | 2451 | DEFVAR_BOOL ("completion-ignore-case", &completion_ignore_case |
| 2433 | "Non-nil means don't consider case significant in completion."); | 2452 | /* Non-nil means don't consider case significant in completion. */); |
| 2434 | completion_ignore_case = 0; | 2453 | completion_ignore_case = 0; |
| 2435 | 2454 | ||
| 2436 | DEFVAR_BOOL ("enable-recursive-minibuffers", &enable_recursive_minibuffers, | 2455 | DEFVAR_BOOL ("enable-recursive-minibuffers", &enable_recursive_minibuffers |
| 2437 | "*Non-nil means to allow minibuffer commands while in the minibuffer.\n\ | 2456 | /* *Non-nil means to allow minibuffer commands while in the minibuffer. |
| 2438 | This variable makes a difference whenever the minibuffer window is active."); | 2457 | This variable makes a difference whenever the minibuffer window is active. */); |
| 2439 | enable_recursive_minibuffers = 0; | 2458 | enable_recursive_minibuffers = 0; |
| 2440 | 2459 | ||
| 2441 | DEFVAR_LISP ("minibuffer-completion-table", &Vminibuffer_completion_table, | 2460 | DEFVAR_LISP ("minibuffer-completion-table", &Vminibuffer_completion_table |
| 2442 | "Alist or obarray used for completion in the minibuffer.\n\ | 2461 | /* Alist or obarray used for completion in the minibuffer. |
| 2443 | This becomes the ALIST argument to `try-completion' and `all-completion'.\n\ | 2462 | This becomes the ALIST argument to `try-completion' and `all-completion'. |
| 2444 | \n\ | 2463 | |
| 2445 | The value may alternatively be a function, which is given three arguments:\n\ | 2464 | The value may alternatively be a function, which is given three arguments: |
| 2446 | STRING, the current buffer contents;\n\ | 2465 | STRING, the current buffer contents; |
| 2447 | PREDICATE, the predicate for filtering possible matches;\n\ | 2466 | PREDICATE, the predicate for filtering possible matches; |
| 2448 | CODE, which says what kind of things to do.\n\ | 2467 | CODE, which says what kind of things to do. |
| 2449 | CODE can be nil, t or `lambda'.\n\ | 2468 | CODE can be nil, t or `lambda'. |
| 2450 | nil means to return the best completion of STRING, or nil if there is none.\n\ | 2469 | nil means to return the best completion of STRING, or nil if there is none. |
| 2451 | t means to return a list of all possible completions of STRING.\n\ | 2470 | t means to return a list of all possible completions of STRING. |
| 2452 | `lambda' means to return t if STRING is a valid completion as it stands."); | 2471 | `lambda' means to return t if STRING is a valid completion as it stands. */); |
| 2453 | Vminibuffer_completion_table = Qnil; | 2472 | Vminibuffer_completion_table = Qnil; |
| 2454 | 2473 | ||
| 2455 | DEFVAR_LISP ("minibuffer-completion-predicate", &Vminibuffer_completion_predicate, | 2474 | DEFVAR_LISP ("minibuffer-completion-predicate", &Vminibuffer_completion_predicate |
| 2456 | "Within call to `completing-read', this holds the PREDICATE argument."); | 2475 | /* Within call to `completing-read', this holds the PREDICATE argument. */); |
| 2457 | Vminibuffer_completion_predicate = Qnil; | 2476 | Vminibuffer_completion_predicate = Qnil; |
| 2458 | 2477 | ||
| 2459 | DEFVAR_LISP ("minibuffer-completion-confirm", &Vminibuffer_completion_confirm, | 2478 | DEFVAR_LISP ("minibuffer-completion-confirm", &Vminibuffer_completion_confirm |
| 2460 | "Non-nil => demand confirmation of completion before exiting minibuffer."); | 2479 | /* Non-nil => demand confirmation of completion before exiting minibuffer. */); |
| 2461 | Vminibuffer_completion_confirm = Qnil; | 2480 | Vminibuffer_completion_confirm = Qnil; |
| 2462 | 2481 | ||
| 2463 | DEFVAR_LISP ("minibuffer-completing-file-name", | 2482 | DEFVAR_LISP ("minibuffer-completing-file-name", |
| 2464 | &Vminibuffer_completing_file_name, | 2483 | &Vminibuffer_completing_file_name |
| 2465 | "Non-nil means completing file names."); | 2484 | /* Non-nil means completing file names. */); |
| 2466 | Vminibuffer_completing_file_name = Qnil; | 2485 | Vminibuffer_completing_file_name = Qnil; |
| 2467 | 2486 | ||
| 2468 | DEFVAR_LISP ("minibuffer-help-form", &Vminibuffer_help_form, | 2487 | DEFVAR_LISP ("minibuffer-help-form", &Vminibuffer_help_form |
| 2469 | "Value that `help-form' takes on inside the minibuffer."); | 2488 | /* Value that `help-form' takes on inside the minibuffer. */); |
| 2470 | Vminibuffer_help_form = Qnil; | 2489 | Vminibuffer_help_form = Qnil; |
| 2471 | 2490 | ||
| 2472 | DEFVAR_LISP ("minibuffer-history-variable", &Vminibuffer_history_variable, | 2491 | DEFVAR_LISP ("minibuffer-history-variable", &Vminibuffer_history_variable |
| 2473 | "History list symbol to add minibuffer values to.\n\ | 2492 | /* History list symbol to add minibuffer values to. |
| 2474 | Each string of minibuffer input, as it appears on exit from the minibuffer,\n\ | 2493 | Each string of minibuffer input, as it appears on exit from the minibuffer, |
| 2475 | is added with\n\ | 2494 | is added with |
| 2476 | (set minibuffer-history-variable\n\ | 2495 | (set minibuffer-history-variable |
| 2477 | (cons STRING (symbol-value minibuffer-history-variable)))"); | 2496 | (cons STRING (symbol-value minibuffer-history-variable))) */); |
| 2478 | XSETFASTINT (Vminibuffer_history_variable, 0); | 2497 | XSETFASTINT (Vminibuffer_history_variable, 0); |
| 2479 | 2498 | ||
| 2480 | DEFVAR_LISP ("minibuffer-history-position", &Vminibuffer_history_position, | 2499 | DEFVAR_LISP ("minibuffer-history-position", &Vminibuffer_history_position |
| 2481 | "Current position of redoing in the history list."); | 2500 | /* Current position of redoing in the history list. */); |
| 2482 | Vminibuffer_history_position = Qnil; | 2501 | Vminibuffer_history_position = Qnil; |
| 2483 | 2502 | ||
| 2484 | DEFVAR_BOOL ("minibuffer-auto-raise", &minibuffer_auto_raise, | 2503 | DEFVAR_BOOL ("minibuffer-auto-raise", &minibuffer_auto_raise |
| 2485 | "*Non-nil means entering the minibuffer raises the minibuffer's frame.\n\ | 2504 | /* *Non-nil means entering the minibuffer raises the minibuffer's frame. |
| 2486 | Some uses of the echo area also raise that frame (since they use it too)."); | 2505 | Some uses of the echo area also raise that frame (since they use it too). */); |
| 2487 | minibuffer_auto_raise = 0; | 2506 | minibuffer_auto_raise = 0; |
| 2488 | 2507 | ||
| 2489 | DEFVAR_LISP ("completion-regexp-list", &Vcompletion_regexp_list, | 2508 | DEFVAR_LISP ("completion-regexp-list", &Vcompletion_regexp_list |
| 2490 | "List of regexps that should restrict possible completions."); | 2509 | /* List of regexps that should restrict possible completions. */); |
| 2491 | Vcompletion_regexp_list = Qnil; | 2510 | Vcompletion_regexp_list = Qnil; |
| 2492 | 2511 | ||
| 2493 | DEFVAR_BOOL ("minibuffer-allow-text-properties", | 2512 | DEFVAR_BOOL ("minibuffer-allow-text-properties", |
| 2494 | &minibuffer_allow_text_properties, | 2513 | &minibuffer_allow_text_properties |
| 2495 | "Non-nil means `read-from-minibuffer' should not discard text properties.\n\ | 2514 | /* Non-nil means `read-from-minibuffer' should not discard text properties. |
| 2496 | This also affects `read-string', but it does not affect `read-minibuffer',\n\ | 2515 | This also affects `read-string', but it does not affect `read-minibuffer', |
| 2497 | `read-no-blanks-input', or any of the functions that do minibuffer input\n\ | 2516 | `read-no-blanks-input', or any of the functions that do minibuffer input |
| 2498 | with completion; they always discard text properties."); | 2517 | with completion; they always discard text properties. */); |
| 2499 | minibuffer_allow_text_properties = 0; | 2518 | minibuffer_allow_text_properties = 0; |
| 2500 | 2519 | ||
| 2501 | DEFVAR_LISP ("minibuffer-prompt-properties", &Vminibuffer_prompt_properties, | 2520 | DEFVAR_LISP ("minibuffer-prompt-properties", &Vminibuffer_prompt_properties |
| 2502 | "Text properties that are added to minibuffer prompts.\n\ | 2521 | /* Text properties that are added to minibuffer prompts. |
| 2503 | These are in addition to the basic `field' property, and stickiness\n\ | 2522 | These are in addition to the basic `field' property, and stickiness |
| 2504 | properties."); | 2523 | properties. */); |
| 2505 | /* We use `intern' here instead of Qread_only to avoid | 2524 | /* We use `intern' here instead of Qread_only to avoid |
| 2506 | initialization-order problems. */ | 2525 | initialization-order problems. */ |
| 2507 | Vminibuffer_prompt_properties | 2526 | Vminibuffer_prompt_properties |