diff options
| author | Miles Bader | 2001-10-17 03:16:12 +0000 |
|---|---|---|
| committer | Miles Bader | 2001-10-17 03:16:12 +0000 |
| commit | 7ee72033eb52c5891e39c80b6db21e491ce0b187 (patch) | |
| tree | 5d7f0e7a7efbf8ada6531247701ba53d6c70579d /src/editfns.c | |
| parent | 015a8883e056cd23d926a45304b63880b7a99063 (diff) | |
| download | emacs-7ee72033eb52c5891e39c80b6db21e491ce0b187.tar.gz emacs-7ee72033eb52c5891e39c80b6db21e491ce0b187.zip | |
Change doc-string comments to `new style' [w/`doc:' keyword].
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 461 |
1 files changed, 230 insertions, 231 deletions
diff --git a/src/editfns.c b/src/editfns.c index af2839f4f0a..51d328ab2ec 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -34,7 +34,6 @@ 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 | ||
| 38 | #include "lisp.h" | 37 | #include "lisp.h" |
| 39 | #include "intervals.h" | 38 | #include "intervals.h" |
| 40 | #include "buffer.h" | 39 | #include "buffer.h" |
| @@ -165,8 +164,8 @@ init_editfns () | |||
| 165 | } | 164 | } |
| 166 | 165 | ||
| 167 | DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, | 166 | DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, |
| 168 | /* Convert arg CHARACTER to a string containing that character. */ | 167 | doc: /* Convert arg CHARACTER to a string containing that character. */) |
| 169 | (character)) | 168 | (character) |
| 170 | Lisp_Object character; | 169 | Lisp_Object character; |
| 171 | { | 170 | { |
| 172 | int len; | 171 | int len; |
| @@ -181,9 +180,9 @@ DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, | |||
| 181 | } | 180 | } |
| 182 | 181 | ||
| 183 | DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, | 182 | DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, |
| 184 | /* Convert arg STRING to a character, the first character of that string. | 183 | doc: /* Convert arg STRING to a character, the first character of that string. |
| 185 | A multibyte character is handled correctly. */ | 184 | A multibyte character is handled correctly. */) |
| 186 | (string)) | 185 | (string) |
| 187 | register Lisp_Object string; | 186 | register Lisp_Object string; |
| 188 | { | 187 | { |
| 189 | register Lisp_Object val; | 188 | register Lisp_Object val; |
| @@ -213,9 +212,9 @@ buildmark (charpos, bytepos) | |||
| 213 | } | 212 | } |
| 214 | 213 | ||
| 215 | DEFUN ("point", Fpoint, Spoint, 0, 0, 0, | 214 | DEFUN ("point", Fpoint, Spoint, 0, 0, 0, |
| 216 | /* Return value of point, as an integer. | 215 | doc: /* Return value of point, as an integer. |
| 217 | Beginning of buffer is position (point-min). */ | 216 | Beginning of buffer is position (point-min). */) |
| 218 | ()) | 217 | () |
| 219 | { | 218 | { |
| 220 | Lisp_Object temp; | 219 | Lisp_Object temp; |
| 221 | XSETFASTINT (temp, PT); | 220 | XSETFASTINT (temp, PT); |
| @@ -223,8 +222,8 @@ Beginning of buffer is position (point-min). */ | |||
| 223 | } | 222 | } |
| 224 | 223 | ||
| 225 | DEFUN ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, | 224 | DEFUN ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, |
| 226 | /* Return value of point, as a marker object. */ | 225 | doc: /* Return value of point, as a marker object. */) |
| 227 | ()) | 226 | () |
| 228 | { | 227 | { |
| 229 | return buildmark (PT, PT_BYTE); | 228 | return buildmark (PT, PT_BYTE); |
| 230 | } | 229 | } |
| @@ -242,12 +241,12 @@ clip_to_bounds (lower, num, upper) | |||
| 242 | } | 241 | } |
| 243 | 242 | ||
| 244 | DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", | 243 | DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", |
| 245 | /* Set point to POSITION, a number or marker. | 244 | doc: /* Set point to POSITION, a number or marker. |
| 246 | Beginning of buffer is position (point-min), end is (point-max). | 245 | Beginning of buffer is position (point-min), end is (point-max). |
| 247 | If the position is in the middle of a multibyte form, | 246 | If the position is in the middle of a multibyte form, |
| 248 | the actual point is set at the head of the multibyte form | 247 | the actual point is set at the head of the multibyte form |
| 249 | except in the case that `enable-multibyte-characters' is nil. */ | 248 | except in the case that `enable-multibyte-characters' is nil. */) |
| 250 | (position)) | 249 | (position) |
| 251 | register Lisp_Object position; | 250 | register Lisp_Object position; |
| 252 | { | 251 | { |
| 253 | int pos; | 252 | int pos; |
| @@ -300,24 +299,24 @@ region_limit (beginningp) | |||
| 300 | } | 299 | } |
| 301 | 300 | ||
| 302 | DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, | 301 | DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, |
| 303 | /* Return position of beginning of region, as an integer. */ | 302 | doc: /* Return position of beginning of region, as an integer. */) |
| 304 | ()) | 303 | () |
| 305 | { | 304 | { |
| 306 | return region_limit (1); | 305 | return region_limit (1); |
| 307 | } | 306 | } |
| 308 | 307 | ||
| 309 | DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0, | 308 | DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0, |
| 310 | /* Return position of end of region, as an integer. */ | 309 | doc: /* Return position of end of region, as an integer. */) |
| 311 | ()) | 310 | () |
| 312 | { | 311 | { |
| 313 | return region_limit (0); | 312 | return region_limit (0); |
| 314 | } | 313 | } |
| 315 | 314 | ||
| 316 | DEFUN ("mark-marker", Fmark_marker, Smark_marker, 0, 0, 0, | 315 | DEFUN ("mark-marker", Fmark_marker, Smark_marker, 0, 0, 0, |
| 317 | /* Return this buffer's mark, as a marker object. | 316 | doc: /* Return this buffer's mark, as a marker object. |
| 318 | Watch out! Moving this marker changes the mark position. | 317 | Watch out! Moving this marker changes the mark position. |
| 319 | If you set the marker not to point anywhere, the buffer will have no mark. */ | 318 | If you set the marker not to point anywhere, the buffer will have no mark. */) |
| 320 | ()) | 319 | () |
| 321 | { | 320 | { |
| 322 | return current_buffer->mark; | 321 | return current_buffer->mark; |
| 323 | } | 322 | } |
| @@ -557,10 +556,10 @@ find_field (pos, merge_at_boundary, beg, end) | |||
| 557 | 556 | ||
| 558 | 557 | ||
| 559 | DEFUN ("delete-field", Fdelete_field, Sdelete_field, 0, 1, 0, | 558 | DEFUN ("delete-field", Fdelete_field, Sdelete_field, 0, 1, 0, |
| 560 | /* Delete the field surrounding POS. | 559 | doc: /* Delete the field surrounding POS. |
| 561 | A field is a region of text with the same `field' property. | 560 | A field is a region of text with the same `field' property. |
| 562 | If POS is nil, the value of point is used for POS. */ | 561 | If POS is nil, the value of point is used for POS. */) |
| 563 | (pos)) | 562 | (pos) |
| 564 | Lisp_Object pos; | 563 | Lisp_Object pos; |
| 565 | { | 564 | { |
| 566 | int beg, end; | 565 | int beg, end; |
| @@ -571,10 +570,10 @@ If POS is nil, the value of point is used for POS. */ | |||
| 571 | } | 570 | } |
| 572 | 571 | ||
| 573 | DEFUN ("field-string", Ffield_string, Sfield_string, 0, 1, 0, | 572 | DEFUN ("field-string", Ffield_string, Sfield_string, 0, 1, 0, |
| 574 | /* Return the contents of the field surrounding POS as a string. | 573 | doc: /* Return the contents of the field surrounding POS as a string. |
| 575 | A field is a region of text with the same `field' property. | 574 | A field is a region of text with the same `field' property. |
| 576 | If POS is nil, the value of point is used for POS. */ | 575 | If POS is nil, the value of point is used for POS. */) |
| 577 | (pos)) | 576 | (pos) |
| 578 | Lisp_Object pos; | 577 | Lisp_Object pos; |
| 579 | { | 578 | { |
| 580 | int beg, end; | 579 | int beg, end; |
| @@ -583,10 +582,10 @@ If POS is nil, the value of point is used for POS. */ | |||
| 583 | } | 582 | } |
| 584 | 583 | ||
| 585 | DEFUN ("field-string-no-properties", Ffield_string_no_properties, Sfield_string_no_properties, 0, 1, 0, | 584 | DEFUN ("field-string-no-properties", Ffield_string_no_properties, Sfield_string_no_properties, 0, 1, 0, |
| 586 | /* Return the contents of the field around POS, without text-properties. | 585 | doc: /* Return the contents of the field around POS, without text-properties. |
| 587 | A field is a region of text with the same `field' property. | 586 | A field is a region of text with the same `field' property. |
| 588 | If POS is nil, the value of point is used for POS. */ | 587 | If POS is nil, the value of point is used for POS. */) |
| 589 | (pos)) | 588 | (pos) |
| 590 | Lisp_Object pos; | 589 | Lisp_Object pos; |
| 591 | { | 590 | { |
| 592 | int beg, end; | 591 | int beg, end; |
| @@ -595,12 +594,12 @@ If POS is nil, the value of point is used for POS. */ | |||
| 595 | } | 594 | } |
| 596 | 595 | ||
| 597 | DEFUN ("field-beginning", Ffield_beginning, Sfield_beginning, 0, 2, 0, | 596 | DEFUN ("field-beginning", Ffield_beginning, Sfield_beginning, 0, 2, 0, |
| 598 | /* Return the beginning of the field surrounding POS. | 597 | doc: /* Return the beginning of the field surrounding POS. |
| 599 | A field is a region of text with the same `field' property. | 598 | A field is a region of text with the same `field' property. |
| 600 | If POS is nil, the value of point is used for POS. | 599 | If POS is nil, the value of point is used for POS. |
| 601 | If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its | 600 | If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its |
| 602 | field, then the beginning of the *previous* field is returned. */ | 601 | field, then the beginning of the *previous* field is returned. */) |
| 603 | (pos, escape_from_edge)) | 602 | (pos, escape_from_edge) |
| 604 | Lisp_Object pos, escape_from_edge; | 603 | Lisp_Object pos, escape_from_edge; |
| 605 | { | 604 | { |
| 606 | int beg; | 605 | int beg; |
| @@ -609,12 +608,12 @@ field, then the beginning of the *previous* field is returned. */ | |||
| 609 | } | 608 | } |
| 610 | 609 | ||
| 611 | DEFUN ("field-end", Ffield_end, Sfield_end, 0, 2, 0, | 610 | DEFUN ("field-end", Ffield_end, Sfield_end, 0, 2, 0, |
| 612 | /* Return the end of the field surrounding POS. | 611 | doc: /* Return the end of the field surrounding POS. |
| 613 | A field is a region of text with the same `field' property. | 612 | A field is a region of text with the same `field' property. |
| 614 | If POS is nil, the value of point is used for POS. | 613 | If POS is nil, the value of point is used for POS. |
| 615 | If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field, | 614 | If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field, |
| 616 | then the end of the *following* field is returned. */ | 615 | then the end of the *following* field is returned. */) |
| 617 | (pos, escape_from_edge)) | 616 | (pos, escape_from_edge) |
| 618 | Lisp_Object pos, escape_from_edge; | 617 | Lisp_Object pos, escape_from_edge; |
| 619 | { | 618 | { |
| 620 | int end; | 619 | int end; |
| @@ -623,7 +622,7 @@ then the end of the *following* field is returned. */ | |||
| 623 | } | 622 | } |
| 624 | 623 | ||
| 625 | DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, | 624 | DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, |
| 626 | /* Return the position closest to NEW-POS that is in the same field as OLD-POS. | 625 | doc: /* Return the position closest to NEW-POS that is in the same field as OLD-POS. |
| 627 | 626 | ||
| 628 | A field is a region of text with the same `field' property. | 627 | A field is a region of text with the same `field' property. |
| 629 | If NEW-POS is nil, then the current point is used instead, and set to the | 628 | If NEW-POS is nil, then the current point is used instead, and set to the |
| @@ -648,8 +647,8 @@ only in the case where they can still move to the right line. | |||
| 648 | If the optional argument INHIBIT-CAPTURE-PROPERTY is non-nil, and OLD-POS has | 647 | If the optional argument INHIBIT-CAPTURE-PROPERTY is non-nil, and OLD-POS has |
| 649 | a non-nil property of that name, then any field boundaries are ignored. | 648 | a non-nil property of that name, then any field boundaries are ignored. |
| 650 | 649 | ||
| 651 | Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */ | 650 | Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) |
| 652 | (new_pos, old_pos, escape_from_edge, only_in_line, inhibit_capture_property)) | 651 | (new_pos, old_pos, escape_from_edge, only_in_line, inhibit_capture_property) |
| 653 | Lisp_Object new_pos, old_pos; | 652 | Lisp_Object new_pos, old_pos; |
| 654 | Lisp_Object escape_from_edge, only_in_line, inhibit_capture_property; | 653 | Lisp_Object escape_from_edge, only_in_line, inhibit_capture_property; |
| 655 | { | 654 | { |
| @@ -716,7 +715,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */ | |||
| 716 | 715 | ||
| 717 | DEFUN ("line-beginning-position", Fline_beginning_position, Sline_beginning_position, | 716 | DEFUN ("line-beginning-position", Fline_beginning_position, Sline_beginning_position, |
| 718 | 0, 1, 0, | 717 | 0, 1, 0, |
| 719 | /* Return the character position of the first character on the current line. | 718 | doc: /* Return the character position of the first character on the current line. |
| 720 | With argument N not nil or 1, move forward N - 1 lines first. | 719 | With argument N not nil or 1, move forward N - 1 lines first. |
| 721 | If scan reaches end of buffer, return that position. | 720 | If scan reaches end of buffer, return that position. |
| 722 | The scan does not cross a field boundary unless it would move | 721 | The scan does not cross a field boundary unless it would move |
| @@ -724,8 +723,8 @@ beyond there to a different line. Field boundaries are not noticed if | |||
| 724 | `inhibit-field-text-motion' is non-nil. And if N is nil or 1, | 723 | `inhibit-field-text-motion' is non-nil. And if N is nil or 1, |
| 725 | and scan starts at a field boundary, the scan stops as soon as it starts. | 724 | and scan starts at a field boundary, the scan stops as soon as it starts. |
| 726 | 725 | ||
| 727 | This function does not move point. */ | 726 | This function does not move point. */) |
| 728 | (n)) | 727 | (n) |
| 729 | Lisp_Object n; | 728 | Lisp_Object n; |
| 730 | { | 729 | { |
| 731 | int orig, orig_byte, end; | 730 | int orig, orig_byte, end; |
| @@ -750,11 +749,11 @@ This function does not move point. */ | |||
| 750 | 749 | ||
| 751 | DEFUN ("line-end-position", Fline_end_position, Sline_end_position, | 750 | DEFUN ("line-end-position", Fline_end_position, Sline_end_position, |
| 752 | 0, 1, 0, | 751 | 0, 1, 0, |
| 753 | /* Return the character position of the last character on the current line. | 752 | doc: /* Return the character position of the last character on the current line. |
| 754 | With argument N not nil or 1, move forward N - 1 lines first. | 753 | With argument N not nil or 1, move forward N - 1 lines first. |
| 755 | If scan reaches end of buffer, return that position. | 754 | If scan reaches end of buffer, return that position. |
| 756 | This function does not move point. */ | 755 | This function does not move point. */) |
| 757 | (n)) | 756 | (n) |
| 758 | Lisp_Object n; | 757 | Lisp_Object n; |
| 759 | { | 758 | { |
| 760 | int end_pos; | 759 | int end_pos; |
| @@ -871,7 +870,7 @@ save_excursion_restore (info) | |||
| 871 | } | 870 | } |
| 872 | 871 | ||
| 873 | DEFUN ("save-excursion", Fsave_excursion, Ssave_excursion, 0, UNEVALLED, 0, | 872 | DEFUN ("save-excursion", Fsave_excursion, Ssave_excursion, 0, UNEVALLED, 0, |
| 874 | /* Save point, mark, and current buffer; execute BODY; restore those things. | 873 | doc: /* Save point, mark, and current buffer; execute BODY; restore those things. |
| 875 | Executes BODY just like `progn'. | 874 | Executes BODY just like `progn'. |
| 876 | The values of point, mark and the current buffer are restored | 875 | The values of point, mark and the current buffer are restored |
| 877 | even in case of abnormal exit (throw or error). | 876 | even in case of abnormal exit (throw or error). |
| @@ -880,8 +879,8 @@ The state of activation of the mark is also restored. | |||
| 880 | This construct does not save `deactivate-mark', and therefore | 879 | This construct does not save `deactivate-mark', and therefore |
| 881 | functions that change the buffer will still cause deactivation | 880 | functions that change the buffer will still cause deactivation |
| 882 | of the mark at the end of the command. To prevent that, bind | 881 | of the mark at the end of the command. To prevent that, bind |
| 883 | `deactivate-mark' with `let'. */ | 882 | `deactivate-mark' with `let'. */) |
| 884 | (args)) | 883 | (args) |
| 885 | Lisp_Object args; | 884 | Lisp_Object args; |
| 886 | { | 885 | { |
| 887 | register Lisp_Object val; | 886 | register Lisp_Object val; |
| @@ -894,9 +893,9 @@ of the mark at the end of the command. To prevent that, bind | |||
| 894 | } | 893 | } |
| 895 | 894 | ||
| 896 | DEFUN ("save-current-buffer", Fsave_current_buffer, Ssave_current_buffer, 0, UNEVALLED, 0, | 895 | DEFUN ("save-current-buffer", Fsave_current_buffer, Ssave_current_buffer, 0, UNEVALLED, 0, |
| 897 | /* Save the current buffer; execute BODY; restore the current buffer. | 896 | doc: /* Save the current buffer; execute BODY; restore the current buffer. |
| 898 | Executes BODY just like `progn'. */ | 897 | Executes BODY just like `progn'. */) |
| 899 | (args)) | 898 | (args) |
| 900 | Lisp_Object args; | 899 | Lisp_Object args; |
| 901 | { | 900 | { |
| 902 | Lisp_Object val; | 901 | Lisp_Object val; |
| @@ -909,9 +908,9 @@ Executes BODY just like `progn'. */ | |||
| 909 | } | 908 | } |
| 910 | 909 | ||
| 911 | DEFUN ("buffer-size", Fbufsize, Sbufsize, 0, 1, 0, | 910 | DEFUN ("buffer-size", Fbufsize, Sbufsize, 0, 1, 0, |
| 912 | /* Return the number of characters in the current buffer. | 911 | doc: /* Return the number of characters in the current buffer. |
| 913 | If BUFFER, return the number of characters in that buffer instead. */ | 912 | If BUFFER, return the number of characters in that buffer instead. */) |
| 914 | (buffer)) | 913 | (buffer) |
| 915 | Lisp_Object buffer; | 914 | Lisp_Object buffer; |
| 916 | { | 915 | { |
| 917 | if (NILP (buffer)) | 916 | if (NILP (buffer)) |
| @@ -925,9 +924,9 @@ If BUFFER, return the number of characters in that buffer instead. */ | |||
| 925 | } | 924 | } |
| 926 | 925 | ||
| 927 | DEFUN ("point-min", Fpoint_min, Spoint_min, 0, 0, 0, | 926 | DEFUN ("point-min", Fpoint_min, Spoint_min, 0, 0, 0, |
| 928 | /* Return the minimum permissible value of point in the current buffer. | 927 | doc: /* Return the minimum permissible value of point in the current buffer. |
| 929 | This is 1, unless narrowing (a buffer restriction) is in effect. */ | 928 | This is 1, unless narrowing (a buffer restriction) is in effect. */) |
| 930 | ()) | 929 | () |
| 931 | { | 930 | { |
| 932 | Lisp_Object temp; | 931 | Lisp_Object temp; |
| 933 | XSETFASTINT (temp, BEGV); | 932 | XSETFASTINT (temp, BEGV); |
| @@ -935,18 +934,18 @@ This is 1, unless narrowing (a buffer restriction) is in effect. */ | |||
| 935 | } | 934 | } |
| 936 | 935 | ||
| 937 | DEFUN ("point-min-marker", Fpoint_min_marker, Spoint_min_marker, 0, 0, 0, | 936 | DEFUN ("point-min-marker", Fpoint_min_marker, Spoint_min_marker, 0, 0, 0, |
| 938 | /* Return a marker to the minimum permissible value of point in this buffer. | 937 | doc: /* Return a marker to the minimum permissible value of point in this buffer. |
| 939 | This is the beginning, unless narrowing (a buffer restriction) is in effect. */ | 938 | This is the beginning, unless narrowing (a buffer restriction) is in effect. */) |
| 940 | ()) | 939 | () |
| 941 | { | 940 | { |
| 942 | return buildmark (BEGV, BEGV_BYTE); | 941 | return buildmark (BEGV, BEGV_BYTE); |
| 943 | } | 942 | } |
| 944 | 943 | ||
| 945 | DEFUN ("point-max", Fpoint_max, Spoint_max, 0, 0, 0, | 944 | DEFUN ("point-max", Fpoint_max, Spoint_max, 0, 0, 0, |
| 946 | /* Return the maximum permissible value of point in the current buffer. | 945 | doc: /* Return the maximum permissible value of point in the current buffer. |
| 947 | This is (1+ (buffer-size)), unless narrowing (a buffer restriction) | 946 | This is (1+ (buffer-size)), unless narrowing (a buffer restriction) |
| 948 | is in effect, in which case it is less. */ | 947 | is in effect, in which case it is less. */) |
| 949 | ()) | 948 | () |
| 950 | { | 949 | { |
| 951 | Lisp_Object temp; | 950 | Lisp_Object temp; |
| 952 | XSETFASTINT (temp, ZV); | 951 | XSETFASTINT (temp, ZV); |
| @@ -954,18 +953,18 @@ is in effect, in which case it is less. */ | |||
| 954 | } | 953 | } |
| 955 | 954 | ||
| 956 | DEFUN ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0, | 955 | DEFUN ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0, |
| 957 | /* Return a marker to the maximum permissible value of point in this buffer. | 956 | doc: /* Return a marker to the maximum permissible value of point in this buffer. |
| 958 | This is (1+ (buffer-size)), unless narrowing (a buffer restriction) | 957 | This is (1+ (buffer-size)), unless narrowing (a buffer restriction) |
| 959 | is in effect, in which case it is less. */ | 958 | is in effect, in which case it is less. */) |
| 960 | ()) | 959 | () |
| 961 | { | 960 | { |
| 962 | return buildmark (ZV, ZV_BYTE); | 961 | return buildmark (ZV, ZV_BYTE); |
| 963 | } | 962 | } |
| 964 | 963 | ||
| 965 | DEFUN ("gap-position", Fgap_position, Sgap_position, 0, 0, 0, | 964 | DEFUN ("gap-position", Fgap_position, Sgap_position, 0, 0, 0, |
| 966 | /* Return the position of the gap, in the current buffer. | 965 | doc: /* Return the position of the gap, in the current buffer. |
| 967 | See also `gap-size'. */ | 966 | See also `gap-size'. */) |
| 968 | ()) | 967 | () |
| 969 | { | 968 | { |
| 970 | Lisp_Object temp; | 969 | Lisp_Object temp; |
| 971 | XSETFASTINT (temp, GPT); | 970 | XSETFASTINT (temp, GPT); |
| @@ -973,9 +972,9 @@ See also `gap-size'. */ | |||
| 973 | } | 972 | } |
| 974 | 973 | ||
| 975 | DEFUN ("gap-size", Fgap_size, Sgap_size, 0, 0, 0, | 974 | DEFUN ("gap-size", Fgap_size, Sgap_size, 0, 0, 0, |
| 976 | /* Return the size of the current buffer's gap. | 975 | doc: /* Return the size of the current buffer's gap. |
| 977 | See also `gap-position'. */ | 976 | See also `gap-position'. */) |
| 978 | ()) | 977 | () |
| 979 | { | 978 | { |
| 980 | Lisp_Object temp; | 979 | Lisp_Object temp; |
| 981 | XSETFASTINT (temp, GAP_SIZE); | 980 | XSETFASTINT (temp, GAP_SIZE); |
| @@ -983,9 +982,9 @@ See also `gap-position'. */ | |||
| 983 | } | 982 | } |
| 984 | 983 | ||
| 985 | DEFUN ("position-bytes", Fposition_bytes, Sposition_bytes, 1, 1, 0, | 984 | DEFUN ("position-bytes", Fposition_bytes, Sposition_bytes, 1, 1, 0, |
| 986 | /* Return the byte position for character position POSITION. | 985 | doc: /* Return the byte position for character position POSITION. |
| 987 | If POSITION is out of range, the value is nil. */ | 986 | If POSITION is out of range, the value is nil. */) |
| 988 | (position)) | 987 | (position) |
| 989 | Lisp_Object position; | 988 | Lisp_Object position; |
| 990 | { | 989 | { |
| 991 | CHECK_NUMBER_COERCE_MARKER (position, 1); | 990 | CHECK_NUMBER_COERCE_MARKER (position, 1); |
| @@ -995,9 +994,9 @@ If POSITION is out of range, the value is nil. */ | |||
| 995 | } | 994 | } |
| 996 | 995 | ||
| 997 | DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0, | 996 | DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0, |
| 998 | /* Return the character position for byte position BYTEPOS. | 997 | doc: /* Return the character position for byte position BYTEPOS. |
| 999 | If BYTEPOS is out of range, the value is nil. */ | 998 | If BYTEPOS is out of range, the value is nil. */) |
| 1000 | (bytepos)) | 999 | (bytepos) |
| 1001 | Lisp_Object bytepos; | 1000 | Lisp_Object bytepos; |
| 1002 | { | 1001 | { |
| 1003 | CHECK_NUMBER (bytepos, 1); | 1002 | CHECK_NUMBER (bytepos, 1); |
| @@ -1007,9 +1006,9 @@ If BYTEPOS is out of range, the value is nil. */ | |||
| 1007 | } | 1006 | } |
| 1008 | 1007 | ||
| 1009 | DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, | 1008 | DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, |
| 1010 | /* Return the character following point, as a number. | 1009 | doc: /* Return the character following point, as a number. |
| 1011 | At the end of the buffer or accessible region, return 0. */ | 1010 | At the end of the buffer or accessible region, return 0. */) |
| 1012 | ()) | 1011 | () |
| 1013 | { | 1012 | { |
| 1014 | Lisp_Object temp; | 1013 | Lisp_Object temp; |
| 1015 | if (PT >= ZV) | 1014 | if (PT >= ZV) |
| @@ -1020,9 +1019,9 @@ At the end of the buffer or accessible region, return 0. */ | |||
| 1020 | } | 1019 | } |
| 1021 | 1020 | ||
| 1022 | DEFUN ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0, | 1021 | DEFUN ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0, |
| 1023 | /* Return the character preceding point, as a number. | 1022 | doc: /* Return the character preceding point, as a number. |
| 1024 | At the beginning of the buffer or accessible region, return 0. */ | 1023 | At the beginning of the buffer or accessible region, return 0. */) |
| 1025 | ()) | 1024 | () |
| 1026 | { | 1025 | { |
| 1027 | Lisp_Object temp; | 1026 | Lisp_Object temp; |
| 1028 | if (PT <= BEGV) | 1027 | if (PT <= BEGV) |
| @@ -1039,9 +1038,9 @@ At the beginning of the buffer or accessible region, return 0. */ | |||
| 1039 | } | 1038 | } |
| 1040 | 1039 | ||
| 1041 | DEFUN ("bobp", Fbobp, Sbobp, 0, 0, 0, | 1040 | DEFUN ("bobp", Fbobp, Sbobp, 0, 0, 0, |
| 1042 | /* Return t if point is at the beginning of the buffer. | 1041 | doc: /* Return t if point is at the beginning of the buffer. |
| 1043 | If the buffer is narrowed, this means the beginning of the narrowed part. */ | 1042 | If the buffer is narrowed, this means the beginning of the narrowed part. */) |
| 1044 | ()) | 1043 | () |
| 1045 | { | 1044 | { |
| 1046 | if (PT == BEGV) | 1045 | if (PT == BEGV) |
| 1047 | return Qt; | 1046 | return Qt; |
| @@ -1049,9 +1048,9 @@ If the buffer is narrowed, this means the beginning of the narrowed part. */ | |||
| 1049 | } | 1048 | } |
| 1050 | 1049 | ||
| 1051 | DEFUN ("eobp", Feobp, Seobp, 0, 0, 0, | 1050 | DEFUN ("eobp", Feobp, Seobp, 0, 0, 0, |
| 1052 | /* Return t if point is at the end of the buffer. | 1051 | doc: /* Return t if point is at the end of the buffer. |
| 1053 | If the buffer is narrowed, this means the end of the narrowed part. */ | 1052 | If the buffer is narrowed, this means the end of the narrowed part. */) |
| 1054 | ()) | 1053 | () |
| 1055 | { | 1054 | { |
| 1056 | if (PT == ZV) | 1055 | if (PT == ZV) |
| 1057 | return Qt; | 1056 | return Qt; |
| @@ -1059,8 +1058,8 @@ If the buffer is narrowed, this means the end of the narrowed part. */ | |||
| 1059 | } | 1058 | } |
| 1060 | 1059 | ||
| 1061 | DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, | 1060 | DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, |
| 1062 | /* Return t if point is at the beginning of a line. */ | 1061 | doc: /* Return t if point is at the beginning of a line. */) |
| 1063 | ()) | 1062 | () |
| 1064 | { | 1063 | { |
| 1065 | if (PT == BEGV || FETCH_BYTE (PT_BYTE - 1) == '\n') | 1064 | if (PT == BEGV || FETCH_BYTE (PT_BYTE - 1) == '\n') |
| 1066 | return Qt; | 1065 | return Qt; |
| @@ -1068,9 +1067,9 @@ DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, | |||
| 1068 | } | 1067 | } |
| 1069 | 1068 | ||
| 1070 | DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, | 1069 | DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, |
| 1071 | /* Return t if point is at the end of a line. | 1070 | doc: /* Return t if point is at the end of a line. |
| 1072 | `End of a line' includes point being at the end of the buffer. */ | 1071 | `End of a line' includes point being at the end of the buffer. */) |
| 1073 | ()) | 1072 | () |
| 1074 | { | 1073 | { |
| 1075 | if (PT == ZV || FETCH_BYTE (PT_BYTE) == '\n') | 1074 | if (PT == ZV || FETCH_BYTE (PT_BYTE) == '\n') |
| 1076 | return Qt; | 1075 | return Qt; |
| @@ -1078,10 +1077,10 @@ DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, | |||
| 1078 | } | 1077 | } |
| 1079 | 1078 | ||
| 1080 | DEFUN ("char-after", Fchar_after, Schar_after, 0, 1, 0, | 1079 | DEFUN ("char-after", Fchar_after, Schar_after, 0, 1, 0, |
| 1081 | /* Return character in current buffer at position POS. | 1080 | doc: /* Return character in current buffer at position POS. |
| 1082 | POS is an integer or a marker. | 1081 | POS is an integer or a marker. |
| 1083 | If POS is out of range, the value is nil. */ | 1082 | If POS is out of range, the value is nil. */) |
| 1084 | (pos)) | 1083 | (pos) |
| 1085 | Lisp_Object pos; | 1084 | Lisp_Object pos; |
| 1086 | { | 1085 | { |
| 1087 | register int pos_byte; | 1086 | register int pos_byte; |
| @@ -1111,10 +1110,10 @@ If POS is out of range, the value is nil. */ | |||
| 1111 | } | 1110 | } |
| 1112 | 1111 | ||
| 1113 | DEFUN ("char-before", Fchar_before, Schar_before, 0, 1, 0, | 1112 | DEFUN ("char-before", Fchar_before, Schar_before, 0, 1, 0, |
| 1114 | /* Return character in current buffer preceding position POS. | 1113 | doc: /* Return character in current buffer preceding position POS. |
| 1115 | POS is an integer or a marker. | 1114 | POS is an integer or a marker. |
| 1116 | If POS is out of range, the value is nil. */ | 1115 | If POS is out of range, the value is nil. */) |
| 1117 | (pos)) | 1116 | (pos) |
| 1118 | Lisp_Object pos; | 1117 | Lisp_Object pos; |
| 1119 | { | 1118 | { |
| 1120 | register Lisp_Object val; | 1119 | register Lisp_Object val; |
| @@ -1157,14 +1156,14 @@ If POS is out of range, the value is nil. */ | |||
| 1157 | } | 1156 | } |
| 1158 | 1157 | ||
| 1159 | DEFUN ("user-login-name", Fuser_login_name, Suser_login_name, 0, 1, 0, | 1158 | DEFUN ("user-login-name", Fuser_login_name, Suser_login_name, 0, 1, 0, |
| 1160 | /* Return the name under which the user logged in, as a string. | 1159 | doc: /* Return the name under which the user logged in, as a string. |
| 1161 | This is based on the effective uid, not the real uid. | 1160 | This is based on the effective uid, not the real uid. |
| 1162 | Also, if the environment variable LOGNAME or USER is set, | 1161 | Also, if the environment variable LOGNAME or USER is set, |
| 1163 | that determines the value of this function. | 1162 | that determines the value of this function. |
| 1164 | 1163 | ||
| 1165 | If optional argument UID is an integer, return the login name of the user | 1164 | If optional argument UID is an integer, return the login name of the user |
| 1166 | with that uid, or nil if there is no such user. */ | 1165 | with that uid, or nil if there is no such user. */) |
| 1167 | (uid)) | 1166 | (uid) |
| 1168 | Lisp_Object uid; | 1167 | Lisp_Object uid; |
| 1169 | { | 1168 | { |
| 1170 | struct passwd *pw; | 1169 | struct passwd *pw; |
| @@ -1185,10 +1184,10 @@ with that uid, or nil if there is no such user. */ | |||
| 1185 | 1184 | ||
| 1186 | DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name, | 1185 | DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name, |
| 1187 | 0, 0, 0, | 1186 | 0, 0, 0, |
| 1188 | /* Return the name of the user's real uid, as a string. | 1187 | doc: /* Return the name of the user's real uid, as a string. |
| 1189 | This ignores the environment variables LOGNAME and USER, so it differs from | 1188 | This ignores the environment variables LOGNAME and USER, so it differs from |
| 1190 | `user-login-name' when running under `su'. */ | 1189 | `user-login-name' when running under `su'. */) |
| 1191 | ()) | 1190 | () |
| 1192 | { | 1191 | { |
| 1193 | /* Set up the user name info if we didn't do it before. | 1192 | /* Set up the user name info if we didn't do it before. |
| 1194 | (That can happen if Emacs is dumpable | 1193 | (That can happen if Emacs is dumpable |
| @@ -1199,31 +1198,31 @@ This ignores the environment variables LOGNAME and USER, so it differs from | |||
| 1199 | } | 1198 | } |
| 1200 | 1199 | ||
| 1201 | DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0, | 1200 | DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0, |
| 1202 | /* Return the effective uid of Emacs. | 1201 | doc: /* Return the effective uid of Emacs. |
| 1203 | Value is an integer or float, depending on the value. */ | 1202 | Value is an integer or float, depending on the value. */) |
| 1204 | ()) | 1203 | () |
| 1205 | { | 1204 | { |
| 1206 | return make_fixnum_or_float (geteuid ()); | 1205 | return make_fixnum_or_float (geteuid ()); |
| 1207 | } | 1206 | } |
| 1208 | 1207 | ||
| 1209 | DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, | 1208 | DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, |
| 1210 | /* Return the real uid of Emacs. | 1209 | doc: /* Return the real uid of Emacs. |
| 1211 | Value is an integer or float, depending on the value. */ | 1210 | Value is an integer or float, depending on the value. */) |
| 1212 | ()) | 1211 | () |
| 1213 | { | 1212 | { |
| 1214 | return make_fixnum_or_float (getuid ()); | 1213 | return make_fixnum_or_float (getuid ()); |
| 1215 | } | 1214 | } |
| 1216 | 1215 | ||
| 1217 | DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0, | 1216 | DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0, |
| 1218 | /* Return the full name of the user logged in, as a string. | 1217 | doc: /* Return the full name of the user logged in, as a string. |
| 1219 | If the full name corresponding to Emacs's userid is not known, | 1218 | If the full name corresponding to Emacs's userid is not known, |
| 1220 | return "unknown". | 1219 | return "unknown". |
| 1221 | 1220 | ||
| 1222 | If optional argument UID is an integer or float, return the full name | 1221 | If optional argument UID is an integer or float, return the full name |
| 1223 | of the user with that uid, or nil if there is no such user. | 1222 | of the user with that uid, or nil if there is no such user. |
| 1224 | If UID is a string, return the full name of the user with that login | 1223 | If UID is a string, return the full name of the user with that login |
| 1225 | name, or nil if there is no such user. */ | 1224 | name, or nil if there is no such user. */) |
| 1226 | (uid)) | 1225 | (uid) |
| 1227 | Lisp_Object uid; | 1226 | Lisp_Object uid; |
| 1228 | { | 1227 | { |
| 1229 | struct passwd *pw; | 1228 | struct passwd *pw; |
| @@ -1271,8 +1270,8 @@ name, or nil if there is no such user. */ | |||
| 1271 | } | 1270 | } |
| 1272 | 1271 | ||
| 1273 | DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, | 1272 | DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, |
| 1274 | /* Return the name of the machine you are running on, as a string. */ | 1273 | doc: /* Return the name of the machine you are running on, as a string. */) |
| 1275 | ()) | 1274 | () |
| 1276 | { | 1275 | { |
| 1277 | return Vsystem_name; | 1276 | return Vsystem_name; |
| 1278 | } | 1277 | } |
| @@ -1289,22 +1288,22 @@ get_system_name () | |||
| 1289 | } | 1288 | } |
| 1290 | 1289 | ||
| 1291 | DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, | 1290 | DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, |
| 1292 | /* Return the process ID of Emacs, as an integer. */ | 1291 | doc: /* Return the process ID of Emacs, as an integer. */) |
| 1293 | ()) | 1292 | () |
| 1294 | { | 1293 | { |
| 1295 | return make_number (getpid ()); | 1294 | return make_number (getpid ()); |
| 1296 | } | 1295 | } |
| 1297 | 1296 | ||
| 1298 | DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, | 1297 | DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, |
| 1299 | /* Return the current time, as the number of seconds since 1970-01-01 00:00:00. | 1298 | doc: /* Return the current time, as the number of seconds since 1970-01-01 00:00:00. |
| 1300 | The time is returned as a list of three integers. The first has the | 1299 | The time is returned as a list of three integers. The first has the |
| 1301 | most significant 16 bits of the seconds, while the second has the | 1300 | most significant 16 bits of the seconds, while the second has the |
| 1302 | least significant 16 bits. The third integer gives the microsecond | 1301 | least significant 16 bits. The third integer gives the microsecond |
| 1303 | count. | 1302 | count. |
| 1304 | 1303 | ||
| 1305 | The microsecond count is zero on systems that do not provide | 1304 | The microsecond count is zero on systems that do not provide |
| 1306 | resolution finer than a second. */ | 1305 | resolution finer than a second. */) |
| 1307 | ()) | 1306 | () |
| 1308 | { | 1307 | { |
| 1309 | EMACS_TIME t; | 1308 | EMACS_TIME t; |
| 1310 | Lisp_Object result[3]; | 1309 | Lisp_Object result[3]; |
| @@ -1370,7 +1369,7 @@ lisp_time_argument (specified_time, result, usec) | |||
| 1370 | } | 1369 | } |
| 1371 | 1370 | ||
| 1372 | DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0, | 1371 | DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0, |
| 1373 | /* Return the current time, as a float number of seconds since the epoch. | 1372 | doc: /* Return the current time, as a float number of seconds since the epoch. |
| 1374 | If an argument is given, it specifies a time to convert to float | 1373 | If an argument is given, it specifies a time to convert to float |
| 1375 | instead of the current time. The argument should have the forms: | 1374 | instead of the current time. The argument should have the forms: |
| 1376 | (HIGH . LOW) or (HIGH LOW USEC) or (HIGH LOW . USEC). | 1375 | (HIGH . LOW) or (HIGH LOW USEC) or (HIGH LOW . USEC). |
| @@ -1378,8 +1377,8 @@ Thus, you can use times obtained from `current-time' | |||
| 1378 | and from `file-attributes'. | 1377 | and from `file-attributes'. |
| 1379 | 1378 | ||
| 1380 | WARNING: Since the result is floating point, it may not be exact. | 1379 | WARNING: Since the result is floating point, it may not be exact. |
| 1381 | Do not use this function if precise time stamps are required. */ | 1380 | Do not use this function if precise time stamps are required. */) |
| 1382 | (specified_time)) | 1381 | (specified_time) |
| 1383 | Lisp_Object specified_time; | 1382 | Lisp_Object specified_time; |
| 1384 | { | 1383 | { |
| 1385 | time_t sec; | 1384 | time_t sec; |
| @@ -1446,7 +1445,7 @@ emacs_memftimeu (s, maxsize, format, format_len, tp, ut) | |||
| 1446 | } | 1445 | } |
| 1447 | 1446 | ||
| 1448 | DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, | 1447 | DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, |
| 1449 | /* Use FORMAT-STRING to format the time TIME, or now if omitted. | 1448 | doc: /* Use FORMAT-STRING to format the time TIME, or now if omitted. |
| 1450 | TIME is specified as (HIGH LOW . IGNORED) or (HIGH . LOW), as returned by | 1449 | TIME is specified as (HIGH LOW . IGNORED) or (HIGH . LOW), as returned by |
| 1451 | `current-time' or `file-attributes'. | 1450 | `current-time' or `file-attributes'. |
| 1452 | The third, optional, argument UNIVERSAL, if non-nil, means describe TIME | 1451 | The third, optional, argument UNIVERSAL, if non-nil, means describe TIME |
| @@ -1494,8 +1493,8 @@ The modifiers are `E' and `O'. For certain characters X, | |||
| 1494 | %EX is a locale's alternative version of %X; | 1493 | %EX is a locale's alternative version of %X; |
| 1495 | %OX is like %X, but uses the locale's number symbols. | 1494 | %OX is like %X, but uses the locale's number symbols. |
| 1496 | 1495 | ||
| 1497 | For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */ | 1496 | For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) |
| 1498 | (format_string, time, universal)) | 1497 | (format_string, time, universal) |
| 1499 | Lisp_Object format_string, time, universal; | 1498 | Lisp_Object format_string, time, universal; |
| 1500 | { | 1499 | { |
| 1501 | time_t value; | 1500 | time_t value; |
| @@ -1543,7 +1542,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */ | |||
| 1543 | } | 1542 | } |
| 1544 | 1543 | ||
| 1545 | DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0, | 1544 | DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0, |
| 1546 | /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE). | 1545 | doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE). |
| 1547 | The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED) | 1546 | The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED) |
| 1548 | or (HIGH . LOW), as from `current-time' and `file-attributes', or `nil' | 1547 | or (HIGH . LOW), as from `current-time' and `file-attributes', or `nil' |
| 1549 | to use the current time. The list has the following nine members: | 1548 | to use the current time. The list has the following nine members: |
| @@ -1554,8 +1553,8 @@ MONTH is an integer between 1 and 12. YEAR is an integer indicating the | |||
| 1554 | four-digit year. DOW is the day of week, an integer between 0 and 6, where | 1553 | four-digit year. DOW is the day of week, an integer between 0 and 6, where |
| 1555 | 0 is Sunday. DST is t if daylight savings time is effect, otherwise nil. | 1554 | 0 is Sunday. DST is t if daylight savings time is effect, otherwise nil. |
| 1556 | ZONE is an integer indicating the number of seconds east of Greenwich. | 1555 | ZONE is an integer indicating the number of seconds east of Greenwich. |
| 1557 | (Note that Common Lisp has different meanings for DOW and ZONE.) */ | 1556 | (Note that Common Lisp has different meanings for DOW and ZONE.) */) |
| 1558 | (specified_time)) | 1557 | (specified_time) |
| 1559 | Lisp_Object specified_time; | 1558 | Lisp_Object specified_time; |
| 1560 | { | 1559 | { |
| 1561 | time_t time_spec; | 1560 | time_t time_spec; |
| @@ -1589,7 +1588,7 @@ ZONE is an integer indicating the number of seconds east of Greenwich. | |||
| 1589 | } | 1588 | } |
| 1590 | 1589 | ||
| 1591 | DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0, | 1590 | DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0, |
| 1592 | /* Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time. | 1591 | doc: /* Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time. |
| 1593 | This is the reverse operation of `decode-time', which see. | 1592 | This is the reverse operation of `decode-time', which see. |
| 1594 | ZONE defaults to the current time zone rule. This can | 1593 | ZONE defaults to the current time zone rule. This can |
| 1595 | be a string or t (as from `set-time-zone-rule'), or it can be a list | 1594 | be a string or t (as from `set-time-zone-rule'), or it can be a list |
| @@ -1604,8 +1603,8 @@ This feature lets (apply 'encode-time (decode-time ...)) work. | |||
| 1604 | Out-of-range values for SEC, MINUTE, HOUR, DAY, or MONTH are allowed; | 1603 | Out-of-range values for SEC, MINUTE, HOUR, DAY, or MONTH are allowed; |
| 1605 | for example, a DAY of 0 means the day preceding the given month. | 1604 | for example, a DAY of 0 means the day preceding the given month. |
| 1606 | Year numbers less than 100 are treated just like other year numbers. | 1605 | Year numbers less than 100 are treated just like other year numbers. |
| 1607 | If you want them to stand for years in this century, you must do that yourself. */ | 1606 | If you want them to stand for years in this century, you must do that yourself. */) |
| 1608 | (nargs, args)) | 1607 | (nargs, args) |
| 1609 | int nargs; | 1608 | int nargs; |
| 1610 | register Lisp_Object *args; | 1609 | register Lisp_Object *args; |
| 1611 | { | 1610 | { |
| @@ -1674,7 +1673,7 @@ If you want them to stand for years in this century, you must do that yourself. | |||
| 1674 | } | 1673 | } |
| 1675 | 1674 | ||
| 1676 | DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0, | 1675 | DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0, |
| 1677 | /* Return the current time, as a human-readable string. | 1676 | doc: /* Return the current time, as a human-readable string. |
| 1678 | Programs can use this function to decode a time, | 1677 | Programs can use this function to decode a time, |
| 1679 | since the number of columns in each field is fixed. | 1678 | since the number of columns in each field is fixed. |
| 1680 | The format is `Sun Sep 16 01:03:52 1973'. | 1679 | The format is `Sun Sep 16 01:03:52 1973'. |
| @@ -1687,8 +1686,8 @@ instead of the current time. The argument should have the form: | |||
| 1687 | or the form: | 1686 | or the form: |
| 1688 | (HIGH LOW . IGNORED). | 1687 | (HIGH LOW . IGNORED). |
| 1689 | Thus, you can use times obtained from `current-time' | 1688 | Thus, you can use times obtained from `current-time' |
| 1690 | and from `file-attributes'. */ | 1689 | and from `file-attributes'. */) |
| 1691 | (specified_time)) | 1690 | (specified_time) |
| 1692 | Lisp_Object specified_time; | 1691 | Lisp_Object specified_time; |
| 1693 | { | 1692 | { |
| 1694 | time_t value; | 1693 | time_t value; |
| @@ -1732,7 +1731,7 @@ tm_diff (a, b) | |||
| 1732 | } | 1731 | } |
| 1733 | 1732 | ||
| 1734 | DEFUN ("current-time-zone", Fcurrent_time_zone, Scurrent_time_zone, 0, 1, 0, | 1733 | DEFUN ("current-time-zone", Fcurrent_time_zone, Scurrent_time_zone, 0, 1, 0, |
| 1735 | /* Return the offset and name for the local time zone. | 1734 | doc: /* Return the offset and name for the local time zone. |
| 1736 | This returns a list of the form (OFFSET NAME). | 1735 | This returns a list of the form (OFFSET NAME). |
| 1737 | OFFSET is an integer number of seconds ahead of UTC (east of Greenwich). | 1736 | OFFSET is an integer number of seconds ahead of UTC (east of Greenwich). |
| 1738 | A negative value means west of Greenwich. | 1737 | A negative value means west of Greenwich. |
| @@ -1747,8 +1746,8 @@ and from `file-attributes'. | |||
| 1747 | 1746 | ||
| 1748 | Some operating systems cannot provide all this information to Emacs; | 1747 | Some operating systems cannot provide all this information to Emacs; |
| 1749 | in this case, `current-time-zone' returns a list containing nil for | 1748 | in this case, `current-time-zone' returns a list containing nil for |
| 1750 | the data it can't find. */ | 1749 | the data it can't find. */) |
| 1751 | (specified_time)) | 1750 | (specified_time) |
| 1752 | Lisp_Object specified_time; | 1751 | Lisp_Object specified_time; |
| 1753 | { | 1752 | { |
| 1754 | time_t value; | 1753 | time_t value; |
| @@ -1804,10 +1803,10 @@ the data it can't find. */ | |||
| 1804 | static char **environbuf; | 1803 | static char **environbuf; |
| 1805 | 1804 | ||
| 1806 | DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0, | 1805 | DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0, |
| 1807 | /* Set the local time zone using TZ, a string specifying a time zone rule. | 1806 | doc: /* Set the local time zone using TZ, a string specifying a time zone rule. |
| 1808 | If TZ is nil, use implementation-defined default time zone information. | 1807 | If TZ is nil, use implementation-defined default time zone information. |
| 1809 | If TZ is t, use Universal Time. */ | 1808 | If TZ is t, use Universal Time. */) |
| 1810 | (tz)) | 1809 | (tz) |
| 1811 | Lisp_Object tz; | 1810 | Lisp_Object tz; |
| 1812 | { | 1811 | { |
| 1813 | char *tzstring; | 1812 | char *tzstring; |
| @@ -1991,7 +1990,7 @@ insert1 (arg) | |||
| 1991 | we don't care if it gets trashed. */ | 1990 | we don't care if it gets trashed. */ |
| 1992 | 1991 | ||
| 1993 | DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0, | 1992 | DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0, |
| 1994 | /* Insert the arguments, either strings or characters, at point. | 1993 | doc: /* Insert the arguments, either strings or characters, at point. |
| 1995 | Point and before-insertion markers move forward to end up | 1994 | Point and before-insertion markers move forward to end up |
| 1996 | after the inserted text. | 1995 | after the inserted text. |
| 1997 | Any other markers at the point of insertion remain before the text. | 1996 | Any other markers at the point of insertion remain before the text. |
| @@ -1999,8 +1998,8 @@ Any other markers at the point of insertion remain before the text. | |||
| 1999 | If the current buffer is multibyte, unibyte strings are converted | 1998 | If the current buffer is multibyte, unibyte strings are converted |
| 2000 | to multibyte for insertion (see `unibyte-char-to-multibyte'). | 1999 | to multibyte for insertion (see `unibyte-char-to-multibyte'). |
| 2001 | If the current buffer is unibyte, multibyte strings are converted | 2000 | If the current buffer is unibyte, multibyte strings are converted |
| 2002 | to unibyte for insertion. */ | 2001 | to unibyte for insertion. */) |
| 2003 | (nargs, args)) | 2002 | (nargs, args) |
| 2004 | int nargs; | 2003 | int nargs; |
| 2005 | register Lisp_Object *args; | 2004 | register Lisp_Object *args; |
| 2006 | { | 2005 | { |
| @@ -2010,7 +2009,7 @@ to unibyte for insertion. */ | |||
| 2010 | 2009 | ||
| 2011 | DEFUN ("insert-and-inherit", Finsert_and_inherit, Sinsert_and_inherit, | 2010 | DEFUN ("insert-and-inherit", Finsert_and_inherit, Sinsert_and_inherit, |
| 2012 | 0, MANY, 0, | 2011 | 0, MANY, 0, |
| 2013 | /* Insert the arguments at point, inheriting properties from adjoining text. | 2012 | doc: /* Insert the arguments at point, inheriting properties from adjoining text. |
| 2014 | Point and before-insertion markers move forward to end up | 2013 | Point and before-insertion markers move forward to end up |
| 2015 | after the inserted text. | 2014 | after the inserted text. |
| 2016 | Any other markers at the point of insertion remain before the text. | 2015 | Any other markers at the point of insertion remain before the text. |
| @@ -2018,8 +2017,8 @@ Any other markers at the point of insertion remain before the text. | |||
| 2018 | If the current buffer is multibyte, unibyte strings are converted | 2017 | If the current buffer is multibyte, unibyte strings are converted |
| 2019 | to multibyte for insertion (see `unibyte-char-to-multibyte'). | 2018 | to multibyte for insertion (see `unibyte-char-to-multibyte'). |
| 2020 | If the current buffer is unibyte, multibyte strings are converted | 2019 | If the current buffer is unibyte, multibyte strings are converted |
| 2021 | to unibyte for insertion. */ | 2020 | to unibyte for insertion. */) |
| 2022 | (nargs, args)) | 2021 | (nargs, args) |
| 2023 | int nargs; | 2022 | int nargs; |
| 2024 | register Lisp_Object *args; | 2023 | register Lisp_Object *args; |
| 2025 | { | 2024 | { |
| @@ -2029,14 +2028,14 @@ to unibyte for insertion. */ | |||
| 2029 | } | 2028 | } |
| 2030 | 2029 | ||
| 2031 | DEFUN ("insert-before-markers", Finsert_before_markers, Sinsert_before_markers, 0, MANY, 0, | 2030 | DEFUN ("insert-before-markers", Finsert_before_markers, Sinsert_before_markers, 0, MANY, 0, |
| 2032 | /* Insert strings or characters at point, relocating markers after the text. | 2031 | doc: /* Insert strings or characters at point, relocating markers after the text. |
| 2033 | Point and markers move forward to end up after the inserted text. | 2032 | Point and markers move forward to end up after the inserted text. |
| 2034 | 2033 | ||
| 2035 | If the current buffer is multibyte, unibyte strings are converted | 2034 | If the current buffer is multibyte, unibyte strings are converted |
| 2036 | to multibyte for insertion (see `unibyte-char-to-multibyte'). | 2035 | to multibyte for insertion (see `unibyte-char-to-multibyte'). |
| 2037 | If the current buffer is unibyte, multibyte strings are converted | 2036 | If the current buffer is unibyte, multibyte strings are converted |
| 2038 | to unibyte for insertion. */ | 2037 | to unibyte for insertion. */) |
| 2039 | (nargs, args)) | 2038 | (nargs, args) |
| 2040 | int nargs; | 2039 | int nargs; |
| 2041 | register Lisp_Object *args; | 2040 | register Lisp_Object *args; |
| 2042 | { | 2041 | { |
| @@ -2048,14 +2047,14 @@ to unibyte for insertion. */ | |||
| 2048 | 2047 | ||
| 2049 | DEFUN ("insert-before-markers-and-inherit", Finsert_and_inherit_before_markers, | 2048 | DEFUN ("insert-before-markers-and-inherit", Finsert_and_inherit_before_markers, |
| 2050 | Sinsert_and_inherit_before_markers, 0, MANY, 0, | 2049 | Sinsert_and_inherit_before_markers, 0, MANY, 0, |
| 2051 | /* Insert text at point, relocating markers and inheriting properties. | 2050 | doc: /* Insert text at point, relocating markers and inheriting properties. |
| 2052 | Point and markers move forward to end up after the inserted text. | 2051 | Point and markers move forward to end up after the inserted text. |
| 2053 | 2052 | ||
| 2054 | If the current buffer is multibyte, unibyte strings are converted | 2053 | If the current buffer is multibyte, unibyte strings are converted |
| 2055 | to multibyte for insertion (see `unibyte-char-to-multibyte'). | 2054 | to multibyte for insertion (see `unibyte-char-to-multibyte'). |
| 2056 | If the current buffer is unibyte, multibyte strings are converted | 2055 | If the current buffer is unibyte, multibyte strings are converted |
| 2057 | to unibyte for insertion. */ | 2056 | to unibyte for insertion. */) |
| 2058 | (nargs, args)) | 2057 | (nargs, args) |
| 2059 | int nargs; | 2058 | int nargs; |
| 2060 | register Lisp_Object *args; | 2059 | register Lisp_Object *args; |
| 2061 | { | 2060 | { |
| @@ -2066,12 +2065,12 @@ to unibyte for insertion. */ | |||
| 2066 | } | 2065 | } |
| 2067 | 2066 | ||
| 2068 | DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, | 2067 | DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, |
| 2069 | /* Insert COUNT (second arg) copies of CHARACTER (first arg). | 2068 | doc: /* Insert COUNT (second arg) copies of CHARACTER (first arg). |
| 2070 | Both arguments are required. | 2069 | Both arguments are required. |
| 2071 | Point, and before-insertion markers, are relocated as in the function `insert'. | 2070 | Point, and before-insertion markers, are relocated as in the function `insert'. |
| 2072 | The optional third arg INHERIT, if non-nil, says to inherit text properties | 2071 | The optional third arg INHERIT, if non-nil, says to inherit text properties |
| 2073 | from adjoining text, if those properties are sticky. */ | 2072 | from adjoining text, if those properties are sticky. */) |
| 2074 | (character, count, inherit)) | 2073 | (character, count, inherit) |
| 2075 | Lisp_Object character, count, inherit; | 2074 | Lisp_Object character, count, inherit; |
| 2076 | { | 2075 | { |
| 2077 | register unsigned char *string; | 2076 | register unsigned char *string; |
| @@ -2222,15 +2221,15 @@ update_buffer_properties (start, end) | |||
| 2222 | } | 2221 | } |
| 2223 | 2222 | ||
| 2224 | DEFUN ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0, | 2223 | DEFUN ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0, |
| 2225 | /* Return the contents of part of the current buffer as a string. | 2224 | doc: /* Return the contents of part of the current buffer as a string. |
| 2226 | The two arguments START and END are character positions; | 2225 | The two arguments START and END are character positions; |
| 2227 | they can be in either order. | 2226 | they can be in either order. |
| 2228 | The string returned is multibyte if the buffer is multibyte. | 2227 | The string returned is multibyte if the buffer is multibyte. |
| 2229 | 2228 | ||
| 2230 | This function copies the text properties of that part of the buffer | 2229 | This function copies the text properties of that part of the buffer |
| 2231 | into the result string; if you don't want the text properties, | 2230 | into the result string; if you don't want the text properties, |
| 2232 | use `buffer-substring-no-properties' instead. */ | 2231 | use `buffer-substring-no-properties' instead. */) |
| 2233 | (start, end)) | 2232 | (start, end) |
| 2234 | Lisp_Object start, end; | 2233 | Lisp_Object start, end; |
| 2235 | { | 2234 | { |
| 2236 | register int b, e; | 2235 | register int b, e; |
| @@ -2244,10 +2243,10 @@ use `buffer-substring-no-properties' instead. */ | |||
| 2244 | 2243 | ||
| 2245 | DEFUN ("buffer-substring-no-properties", Fbuffer_substring_no_properties, | 2244 | DEFUN ("buffer-substring-no-properties", Fbuffer_substring_no_properties, |
| 2246 | Sbuffer_substring_no_properties, 2, 2, 0, | 2245 | Sbuffer_substring_no_properties, 2, 2, 0, |
| 2247 | /* Return the characters of part of the buffer, without the text properties. | 2246 | doc: /* Return the characters of part of the buffer, without the text properties. |
| 2248 | The two arguments START and END are character positions; | 2247 | The two arguments START and END are character positions; |
| 2249 | they can be in either order. */ | 2248 | they can be in either order. */) |
| 2250 | (start, end)) | 2249 | (start, end) |
| 2251 | Lisp_Object start, end; | 2250 | Lisp_Object start, end; |
| 2252 | { | 2251 | { |
| 2253 | register int b, e; | 2252 | register int b, e; |
| @@ -2260,21 +2259,21 @@ they can be in either order. */ | |||
| 2260 | } | 2259 | } |
| 2261 | 2260 | ||
| 2262 | DEFUN ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, | 2261 | DEFUN ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, |
| 2263 | /* Return the contents of the current buffer as a string. | 2262 | doc: /* Return the contents of the current buffer as a string. |
| 2264 | If narrowing is in effect, this function returns only the visible part | 2263 | If narrowing is in effect, this function returns only the visible part |
| 2265 | of the buffer. */ | 2264 | of the buffer. */) |
| 2266 | ()) | 2265 | () |
| 2267 | { | 2266 | { |
| 2268 | return make_buffer_string (BEGV, ZV, 1); | 2267 | return make_buffer_string (BEGV, ZV, 1); |
| 2269 | } | 2268 | } |
| 2270 | 2269 | ||
| 2271 | DEFUN ("insert-buffer-substring", Finsert_buffer_substring, Sinsert_buffer_substring, | 2270 | DEFUN ("insert-buffer-substring", Finsert_buffer_substring, Sinsert_buffer_substring, |
| 2272 | 1, 3, 0, | 2271 | 1, 3, 0, |
| 2273 | /* Insert before point a substring of the contents of buffer BUFFER. | 2272 | doc: /* Insert before point a substring of the contents of buffer BUFFER. |
| 2274 | BUFFER may be a buffer or a buffer name. | 2273 | BUFFER may be a buffer or a buffer name. |
| 2275 | Arguments START and END are character numbers specifying the substring. | 2274 | Arguments START and END are character numbers specifying the substring. |
| 2276 | They default to the beginning and the end of BUFFER. */ | 2275 | They default to the beginning and the end of BUFFER. */) |
| 2277 | (buf, start, end)) | 2276 | (buf, start, end) |
| 2278 | Lisp_Object buf, start, end; | 2277 | Lisp_Object buf, start, end; |
| 2279 | { | 2278 | { |
| 2280 | register int b, e, temp; | 2279 | register int b, e, temp; |
| @@ -2320,15 +2319,15 @@ They default to the beginning and the end of BUFFER. */ | |||
| 2320 | 2319 | ||
| 2321 | DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings, | 2320 | DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings, |
| 2322 | 6, 6, 0, | 2321 | 6, 6, 0, |
| 2323 | /* Compare two substrings of two buffers; return result as number. | 2322 | doc: /* Compare two substrings of two buffers; return result as number. |
| 2324 | the value is -N if first string is less after N-1 chars, | 2323 | the value is -N if first string is less after N-1 chars, |
| 2325 | +N if first string is greater after N-1 chars, or 0 if strings match. | 2324 | +N if first string is greater after N-1 chars, or 0 if strings match. |
| 2326 | Each substring is represented as three arguments: BUFFER, START and END. | 2325 | Each substring is represented as three arguments: BUFFER, START and END. |
| 2327 | That makes six args in all, three for each substring. | 2326 | That makes six args in all, three for each substring. |
| 2328 | 2327 | ||
| 2329 | The value of `case-fold-search' in the current buffer | 2328 | The value of `case-fold-search' in the current buffer |
| 2330 | determines whether case is significant or ignored. */ | 2329 | determines whether case is significant or ignored. */) |
| 2331 | (buffer1, start1, end1, buffer2, start2, end2)) | 2330 | (buffer1, start1, end1, buffer2, start2, end2) |
| 2332 | Lisp_Object buffer1, start1, end1, buffer2, start2, end2; | 2331 | Lisp_Object buffer1, start1, end1, buffer2, start2, end2; |
| 2333 | { | 2332 | { |
| 2334 | register int begp1, endp1, begp2, endp2, temp; | 2333 | register int begp1, endp1, begp2, endp2, temp; |
| @@ -2492,11 +2491,11 @@ subst_char_in_region_unwind_1 (arg) | |||
| 2492 | 2491 | ||
| 2493 | DEFUN ("subst-char-in-region", Fsubst_char_in_region, | 2492 | DEFUN ("subst-char-in-region", Fsubst_char_in_region, |
| 2494 | Ssubst_char_in_region, 4, 5, 0, | 2493 | Ssubst_char_in_region, 4, 5, 0, |
| 2495 | /* From START to END, replace FROMCHAR with TOCHAR each time it occurs. | 2494 | doc: /* From START to END, replace FROMCHAR with TOCHAR each time it occurs. |
| 2496 | If optional arg NOUNDO is non-nil, don't record this change for undo | 2495 | If optional arg NOUNDO is non-nil, don't record this change for undo |
| 2497 | and don't mark the buffer as really changed. | 2496 | and don't mark the buffer as really changed. |
| 2498 | Both characters must have the same length of multi-byte form. */ | 2497 | Both characters must have the same length of multi-byte form. */) |
| 2499 | (start, end, fromchar, tochar, noundo)) | 2498 | (start, end, fromchar, tochar, noundo) |
| 2500 | Lisp_Object start, end, fromchar, tochar, noundo; | 2499 | Lisp_Object start, end, fromchar, tochar, noundo; |
| 2501 | { | 2500 | { |
| 2502 | register int pos, pos_byte, stop, i, len, end_byte; | 2501 | register int pos, pos_byte, stop, i, len, end_byte; |
| @@ -2659,12 +2658,12 @@ Both characters must have the same length of multi-byte form. */ | |||
| 2659 | } | 2658 | } |
| 2660 | 2659 | ||
| 2661 | DEFUN ("translate-region", Ftranslate_region, Stranslate_region, 3, 3, 0, | 2660 | DEFUN ("translate-region", Ftranslate_region, Stranslate_region, 3, 3, 0, |
| 2662 | /* From START to END, translate characters according to TABLE. | 2661 | doc: /* From START to END, translate characters according to TABLE. |
| 2663 | TABLE is a string; the Nth character in it is the mapping | 2662 | TABLE is a string; the Nth character in it is the mapping |
| 2664 | for the character with code N. | 2663 | for the character with code N. |
| 2665 | This function does not alter multibyte characters. | 2664 | This function does not alter multibyte characters. |
| 2666 | It returns the number of characters changed. */ | 2665 | It returns the number of characters changed. */) |
| 2667 | (start, end, table)) | 2666 | (start, end, table) |
| 2668 | Lisp_Object start; | 2667 | Lisp_Object start; |
| 2669 | Lisp_Object end; | 2668 | Lisp_Object end; |
| 2670 | register Lisp_Object table; | 2669 | register Lisp_Object table; |
| @@ -2748,10 +2747,10 @@ It returns the number of characters changed. */ | |||
| 2748 | } | 2747 | } |
| 2749 | 2748 | ||
| 2750 | DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", | 2749 | DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", |
| 2751 | /* Delete the text between point and mark. | 2750 | doc: /* Delete the text between point and mark. |
| 2752 | When called from a program, expects two arguments, | 2751 | When called from a program, expects two arguments, |
| 2753 | positions (integers or markers) specifying the stretch to be deleted. */ | 2752 | positions (integers or markers) specifying the stretch to be deleted. */) |
| 2754 | (start, end)) | 2753 | (start, end) |
| 2755 | Lisp_Object start, end; | 2754 | Lisp_Object start, end; |
| 2756 | { | 2755 | { |
| 2757 | validate_region (&start, &end); | 2756 | validate_region (&start, &end); |
| @@ -2761,8 +2760,8 @@ positions (integers or markers) specifying the stretch to be deleted. */ | |||
| 2761 | 2760 | ||
| 2762 | DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, | 2761 | DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, |
| 2763 | Sdelete_and_extract_region, 2, 2, 0, | 2762 | Sdelete_and_extract_region, 2, 2, 0, |
| 2764 | /* Delete the text between START and END and return it. */ | 2763 | doc: /* Delete the text between START and END and return it. */) |
| 2765 | (start, end)) | 2764 | (start, end) |
| 2766 | Lisp_Object start, end; | 2765 | Lisp_Object start, end; |
| 2767 | { | 2766 | { |
| 2768 | validate_region (&start, &end); | 2767 | validate_region (&start, &end); |
| @@ -2770,9 +2769,9 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, | |||
| 2770 | } | 2769 | } |
| 2771 | 2770 | ||
| 2772 | DEFUN ("widen", Fwiden, Swiden, 0, 0, "", | 2771 | DEFUN ("widen", Fwiden, Swiden, 0, 0, "", |
| 2773 | /* Remove restrictions (narrowing) from current buffer. | 2772 | doc: /* Remove restrictions (narrowing) from current buffer. |
| 2774 | This allows the buffer's full text to be seen and edited. */ | 2773 | This allows the buffer's full text to be seen and edited. */) |
| 2775 | ()) | 2774 | () |
| 2776 | { | 2775 | { |
| 2777 | if (BEG != BEGV || Z != ZV) | 2776 | if (BEG != BEGV || Z != ZV) |
| 2778 | current_buffer->clip_changed = 1; | 2777 | current_buffer->clip_changed = 1; |
| @@ -2785,15 +2784,15 @@ This allows the buffer's full text to be seen and edited. */ | |||
| 2785 | } | 2784 | } |
| 2786 | 2785 | ||
| 2787 | DEFUN ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 2, "r", | 2786 | DEFUN ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 2, "r", |
| 2788 | /* Restrict editing in this buffer to the current region. | 2787 | doc: /* Restrict editing in this buffer to the current region. |
| 2789 | The rest of the text becomes temporarily invisible and untouchable | 2788 | The rest of the text becomes temporarily invisible and untouchable |
| 2790 | but is not deleted; if you save the buffer in a file, the invisible | 2789 | but is not deleted; if you save the buffer in a file, the invisible |
| 2791 | text is included in the file. \\[widen] makes all visible again. | 2790 | text is included in the file. \\[widen] makes all visible again. |
| 2792 | See also `save-restriction'. | 2791 | See also `save-restriction'. |
| 2793 | 2792 | ||
| 2794 | When calling from a program, pass two arguments; positions (integers | 2793 | When calling from a program, pass two arguments; positions (integers |
| 2795 | or markers) bounding the text that should remain visible. */ | 2794 | or markers) bounding the text that should remain visible. */) |
| 2796 | (start, end)) | 2795 | (start, end) |
| 2797 | register Lisp_Object start, end; | 2796 | register Lisp_Object start, end; |
| 2798 | { | 2797 | { |
| 2799 | CHECK_NUMBER_COERCE_MARKER (start, 0); | 2798 | CHECK_NUMBER_COERCE_MARKER (start, 0); |
| @@ -2895,7 +2894,7 @@ save_restriction_restore (data) | |||
| 2895 | } | 2894 | } |
| 2896 | 2895 | ||
| 2897 | DEFUN ("save-restriction", Fsave_restriction, Ssave_restriction, 0, UNEVALLED, 0, | 2896 | DEFUN ("save-restriction", Fsave_restriction, Ssave_restriction, 0, UNEVALLED, 0, |
| 2898 | /* Execute BODY, saving and restoring current buffer's restrictions. | 2897 | doc: /* Execute BODY, saving and restoring current buffer's restrictions. |
| 2899 | The buffer's restrictions make parts of the beginning and end invisible. | 2898 | The buffer's restrictions make parts of the beginning and end invisible. |
| 2900 | (They are set up with `narrow-to-region' and eliminated with `widen'.) | 2899 | (They are set up with `narrow-to-region' and eliminated with `widen'.) |
| 2901 | This special form, `save-restriction', saves the current buffer's restrictions | 2900 | This special form, `save-restriction', saves the current buffer's restrictions |
| @@ -2908,8 +2907,8 @@ The value returned is the value of the last form in BODY. | |||
| 2908 | 2907 | ||
| 2909 | Note: if you are using both `save-excursion' and `save-restriction', | 2908 | Note: if you are using both `save-excursion' and `save-restriction', |
| 2910 | use `save-excursion' outermost: | 2909 | use `save-excursion' outermost: |
| 2911 | (save-excursion (save-restriction ...)) */ | 2910 | (save-excursion (save-restriction ...)) */) |
| 2912 | (body)) | 2911 | (body) |
| 2913 | Lisp_Object body; | 2912 | Lisp_Object body; |
| 2914 | { | 2913 | { |
| 2915 | register Lisp_Object val; | 2914 | register Lisp_Object val; |
| @@ -2927,13 +2926,13 @@ static char *message_text; | |||
| 2927 | static int message_length; | 2926 | static int message_length; |
| 2928 | 2927 | ||
| 2929 | DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, | 2928 | DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, |
| 2930 | /* Print a one-line message at the bottom of the screen. | 2929 | doc: /* Print a one-line message at the bottom of the screen. |
| 2931 | The first argument is a format control string, and the rest are data | 2930 | The first argument is a format control string, and the rest are data |
| 2932 | to be formatted under control of the string. See `format' for details. | 2931 | to be formatted under control of the string. See `format' for details. |
| 2933 | 2932 | ||
| 2934 | If the first argument is nil, clear any existing message; let the | 2933 | If the first argument is nil, clear any existing message; let the |
| 2935 | minibuffer contents show. */ | 2934 | minibuffer contents show. */) |
| 2936 | (nargs, args)) | 2935 | (nargs, args) |
| 2937 | int nargs; | 2936 | int nargs; |
| 2938 | Lisp_Object *args; | 2937 | Lisp_Object *args; |
| 2939 | { | 2938 | { |
| @@ -2952,14 +2951,14 @@ minibuffer contents show. */ | |||
| 2952 | } | 2951 | } |
| 2953 | 2952 | ||
| 2954 | DEFUN ("message-box", Fmessage_box, Smessage_box, 1, MANY, 0, | 2953 | DEFUN ("message-box", Fmessage_box, Smessage_box, 1, MANY, 0, |
| 2955 | /* Display a message, in a dialog box if possible. | 2954 | doc: /* Display a message, in a dialog box if possible. |
| 2956 | If a dialog box is not available, use the echo area. | 2955 | If a dialog box is not available, use the echo area. |
| 2957 | The first argument is a format control string, and the rest are data | 2956 | The first argument is a format control string, and the rest are data |
| 2958 | to be formatted under control of the string. See `format' for details. | 2957 | to be formatted under control of the string. See `format' for details. |
| 2959 | 2958 | ||
| 2960 | If the first argument is nil, clear any existing message; let the | 2959 | If the first argument is nil, clear any existing message; let the |
| 2961 | minibuffer contents show. */ | 2960 | minibuffer contents show. */) |
| 2962 | (nargs, args)) | 2961 | (nargs, args) |
| 2963 | int nargs; | 2962 | int nargs; |
| 2964 | Lisp_Object *args; | 2963 | Lisp_Object *args; |
| 2965 | { | 2964 | { |
| @@ -3010,7 +3009,7 @@ extern Lisp_Object last_nonmenu_event; | |||
| 3010 | #endif | 3009 | #endif |
| 3011 | 3010 | ||
| 3012 | DEFUN ("message-or-box", Fmessage_or_box, Smessage_or_box, 1, MANY, 0, | 3011 | DEFUN ("message-or-box", Fmessage_or_box, Smessage_or_box, 1, MANY, 0, |
| 3013 | /* Display a message in a dialog box or in the echo area. | 3012 | doc: /* Display a message in a dialog box or in the echo area. |
| 3014 | If this command was invoked with the mouse, use a dialog box if | 3013 | If this command was invoked with the mouse, use a dialog box if |
| 3015 | `use-dialog-box' is non-nil. | 3014 | `use-dialog-box' is non-nil. |
| 3016 | Otherwise, use the echo area. | 3015 | Otherwise, use the echo area. |
| @@ -3018,8 +3017,8 @@ The first argument is a format control string, and the rest are data | |||
| 3018 | to be formatted under control of the string. See `format' for details. | 3017 | to be formatted under control of the string. See `format' for details. |
| 3019 | 3018 | ||
| 3020 | If the first argument is nil, clear any existing message; let the | 3019 | If the first argument is nil, clear any existing message; let the |
| 3021 | minibuffer contents show. */ | 3020 | minibuffer contents show. */) |
| 3022 | (nargs, args)) | 3021 | (nargs, args) |
| 3023 | int nargs; | 3022 | int nargs; |
| 3024 | Lisp_Object *args; | 3023 | Lisp_Object *args; |
| 3025 | { | 3024 | { |
| @@ -3032,19 +3031,19 @@ minibuffer contents show. */ | |||
| 3032 | } | 3031 | } |
| 3033 | 3032 | ||
| 3034 | DEFUN ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0, | 3033 | DEFUN ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0, |
| 3035 | /* Return the string currently displayed in the echo area, or nil if none. */ | 3034 | doc: /* Return the string currently displayed in the echo area, or nil if none. */) |
| 3036 | ()) | 3035 | () |
| 3037 | { | 3036 | { |
| 3038 | return current_message (); | 3037 | return current_message (); |
| 3039 | } | 3038 | } |
| 3040 | 3039 | ||
| 3041 | 3040 | ||
| 3042 | DEFUN ("propertize", Fpropertize, Spropertize, 3, MANY, 0, | 3041 | DEFUN ("propertize", Fpropertize, Spropertize, 3, MANY, 0, |
| 3043 | /* Return a copy of STRING with text properties added. | 3042 | doc: /* Return a copy of STRING with text properties added. |
| 3044 | First argument is the string to copy. | 3043 | First argument is the string to copy. |
| 3045 | Remaining arguments form a sequence of PROPERTY VALUE pairs for text | 3044 | Remaining arguments form a sequence of PROPERTY VALUE pairs for text |
| 3046 | properties to add to the result. */ | 3045 | properties to add to the result. */) |
| 3047 | (nargs, args)) | 3046 | (nargs, args) |
| 3048 | int nargs; | 3047 | int nargs; |
| 3049 | Lisp_Object *args; | 3048 | Lisp_Object *args; |
| 3050 | { | 3049 | { |
| @@ -3086,7 +3085,7 @@ properties to add to the result. */ | |||
| 3086 | : STRING_BYTES (XSTRING (STRING))) | 3085 | : STRING_BYTES (XSTRING (STRING))) |
| 3087 | 3086 | ||
| 3088 | DEFUN ("format", Fformat, Sformat, 1, MANY, 0, | 3087 | DEFUN ("format", Fformat, Sformat, 1, MANY, 0, |
| 3089 | /* Format a string out of a control-string and arguments. | 3088 | doc: /* Format a string out of a control-string and arguments. |
| 3090 | The first argument is a control string. | 3089 | The first argument is a control string. |
| 3091 | The other arguments are substituted into it to make the result, a string. | 3090 | The other arguments are substituted into it to make the result, a string. |
| 3092 | It may contain %-sequences meaning to substitute the next argument. | 3091 | It may contain %-sequences meaning to substitute the next argument. |
| @@ -3100,8 +3099,8 @@ It may contain %-sequences meaning to substitute the next argument. | |||
| 3100 | %c means print a number as a single character. | 3099 | %c means print a number as a single character. |
| 3101 | %S means print any object as an s-expression (using `prin1'). | 3100 | %S means print any object as an s-expression (using `prin1'). |
| 3102 | The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. | 3101 | The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. |
| 3103 | Use %% to put a single % into the output. */ | 3102 | Use %% to put a single % into the output. */) |
| 3104 | (nargs, args)) | 3103 | (nargs, args) |
| 3105 | int nargs; | 3104 | int nargs; |
| 3106 | register Lisp_Object *args; | 3105 | register Lisp_Object *args; |
| 3107 | { | 3106 | { |
| @@ -3525,10 +3524,10 @@ format1 (string1) | |||
| 3525 | } | 3524 | } |
| 3526 | 3525 | ||
| 3527 | DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0, | 3526 | DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0, |
| 3528 | /* Return t if two characters match, optionally ignoring case. | 3527 | doc: /* Return t if two characters match, optionally ignoring case. |
| 3529 | Both arguments must be characters (i.e. integers). | 3528 | Both arguments must be characters (i.e. integers). |
| 3530 | Case is ignored if `case-fold-search' is non-nil in the current buffer. */ | 3529 | Case is ignored if `case-fold-search' is non-nil in the current buffer. */) |
| 3531 | (c1, c2)) | 3530 | (c1, c2) |
| 3532 | register Lisp_Object c1, c2; | 3531 | register Lisp_Object c1, c2; |
| 3533 | { | 3532 | { |
| 3534 | int i1, i2; | 3533 | int i1, i2; |
| @@ -3634,15 +3633,15 @@ transpose_markers (start1, end1, start2, end2, | |||
| 3634 | } | 3633 | } |
| 3635 | 3634 | ||
| 3636 | DEFUN ("transpose-regions", Ftranspose_regions, Stranspose_regions, 4, 5, 0, | 3635 | DEFUN ("transpose-regions", Ftranspose_regions, Stranspose_regions, 4, 5, 0, |
| 3637 | /* Transpose region START1 to END1 with START2 to END2. | 3636 | doc: /* Transpose region START1 to END1 with START2 to END2. |
| 3638 | The regions may not be overlapping, because the size of the buffer is | 3637 | The regions may not be overlapping, because the size of the buffer is |
| 3639 | never changed in a transposition. | 3638 | never changed in a transposition. |
| 3640 | 3639 | ||
| 3641 | Optional fifth arg LEAVE_MARKERS, if non-nil, means don't update | 3640 | Optional fifth arg LEAVE_MARKERS, if non-nil, means don't update |
| 3642 | any markers that happen to be located in the regions. | 3641 | any markers that happen to be located in the regions. |
| 3643 | 3642 | ||
| 3644 | Transposing beyond buffer boundaries is an error. */ | 3643 | Transposing beyond buffer boundaries is an error. */) |
| 3645 | (startr1, endr1, startr2, endr2, leave_markers)) | 3644 | (startr1, endr1, startr2, endr2, leave_markers) |
| 3646 | Lisp_Object startr1, endr1, startr2, endr2, leave_markers; | 3645 | Lisp_Object startr1, endr1, startr2, endr2, leave_markers; |
| 3647 | { | 3646 | { |
| 3648 | register int start1, end1, start2, end2; | 3647 | register int start1, end1, start2, end2; |
| @@ -3932,13 +3931,13 @@ syms_of_editfns () | |||
| 3932 | = intern ("buffer-access-fontify-functions"); | 3931 | = intern ("buffer-access-fontify-functions"); |
| 3933 | staticpro (&Qbuffer_access_fontify_functions); | 3932 | staticpro (&Qbuffer_access_fontify_functions); |
| 3934 | 3933 | ||
| 3935 | DEFVAR_LISP ("inhibit-field-text-motion", &Vinhibit_field_text_motion | 3934 | DEFVAR_LISP ("inhibit-field-text-motion", &Vinhibit_field_text_motion, |
| 3936 | /* Non-nil means.text motion commands don't notice fields. */); | 3935 | doc: /* Non-nil means.text motion commands don't notice fields. */); |
| 3937 | Vinhibit_field_text_motion = Qnil; | 3936 | Vinhibit_field_text_motion = Qnil; |
| 3938 | 3937 | ||
| 3939 | DEFVAR_LISP ("buffer-access-fontify-functions", | 3938 | DEFVAR_LISP ("buffer-access-fontify-functions", |
| 3940 | &Vbuffer_access_fontify_functions | 3939 | &Vbuffer_access_fontify_functions, |
| 3941 | /* List of functions called by `buffer-substring' to fontify if necessary. | 3940 | doc: /* List of functions called by `buffer-substring' to fontify if necessary. |
| 3942 | Each function is called with two arguments which specify the range | 3941 | Each function is called with two arguments which specify the range |
| 3943 | of the buffer being accessed. */); | 3942 | of the buffer being accessed. */); |
| 3944 | Vbuffer_access_fontify_functions = Qnil; | 3943 | Vbuffer_access_fontify_functions = Qnil; |
| @@ -3956,23 +3955,23 @@ of the buffer being accessed. */); | |||
| 3956 | } | 3955 | } |
| 3957 | 3956 | ||
| 3958 | DEFVAR_LISP ("buffer-access-fontified-property", | 3957 | DEFVAR_LISP ("buffer-access-fontified-property", |
| 3959 | &Vbuffer_access_fontified_property | 3958 | &Vbuffer_access_fontified_property, |
| 3960 | /* Property which (if non-nil) indicates text has been fontified. | 3959 | doc: /* Property which (if non-nil) indicates text has been fontified. |
| 3961 | `buffer-substring' need not call the `buffer-access-fontify-functions' | 3960 | `buffer-substring' need not call the `buffer-access-fontify-functions' |
| 3962 | functions if all the text being accessed has this property. */); | 3961 | functions if all the text being accessed has this property. */); |
| 3963 | Vbuffer_access_fontified_property = Qnil; | 3962 | Vbuffer_access_fontified_property = Qnil; |
| 3964 | 3963 | ||
| 3965 | DEFVAR_LISP ("system-name", &Vsystem_name | 3964 | DEFVAR_LISP ("system-name", &Vsystem_name, |
| 3966 | /* The name of the machine Emacs is running on. */); | 3965 | doc: /* The name of the machine Emacs is running on. */); |
| 3967 | 3966 | ||
| 3968 | DEFVAR_LISP ("user-full-name", &Vuser_full_name | 3967 | DEFVAR_LISP ("user-full-name", &Vuser_full_name, |
| 3969 | /* The full name of the user logged in. */); | 3968 | doc: /* The full name of the user logged in. */); |
| 3970 | 3969 | ||
| 3971 | DEFVAR_LISP ("user-login-name", &Vuser_login_name | 3970 | DEFVAR_LISP ("user-login-name", &Vuser_login_name, |
| 3972 | /* The user's name, taken from environment variables if possible. */); | 3971 | doc: /* The user's name, taken from environment variables if possible. */); |
| 3973 | 3972 | ||
| 3974 | DEFVAR_LISP ("user-real-login-name", &Vuser_real_login_name | 3973 | DEFVAR_LISP ("user-real-login-name", &Vuser_real_login_name, |
| 3975 | /* The user's name, based upon the real uid only. */); | 3974 | doc: /* The user's name, based upon the real uid only. */); |
| 3976 | 3975 | ||
| 3977 | defsubr (&Spropertize); | 3976 | defsubr (&Spropertize); |
| 3978 | defsubr (&Schar_equal); | 3977 | defsubr (&Schar_equal); |