aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavel Janík2001-10-15 15:07:49 +0000
committerPavel Janík2001-10-15 15:07:49 +0000
commita1f17501163cde84405d0f3ceed4c206890d191a (patch)
treeb0adb3f214e56ccfdba831e331f7d86431d1b029 /src
parente2ba787b86469253337f6360594d5dbbcc154dc8 (diff)
downloademacs-a1f17501163cde84405d0f3ceed4c206890d191a.tar.gz
emacs-a1f17501163cde84405d0f3ceed4c206890d191a.zip
Put doc strings in comments.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/editfns.c1045
-rw-r--r--src/minibuf.c503
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
166DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, 167DEFUN ("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
182DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, 183DEFUN ("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.
184A multibyte character is handled correctly.") 185A 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
214DEFUN ("point", Fpoint, Spoint, 0, 0, 0, 215DEFUN ("point", Fpoint, Spoint, 0, 0, 0,
215 "Return value of point, as an integer.\n\ 216 /* Return value of point, as an integer.
216Beginning of buffer is position (point-min)") 217Beginning 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
224DEFUN ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, 225DEFUN ("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
243DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", 244DEFUN ("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.
245Beginning of buffer is position (point-min), end is (point-max).\n\ 246Beginning of buffer is position (point-min), end is (point-max).
246If the position is in the middle of a multibyte form,\n\ 247If the position is in the middle of a multibyte form,
247the actual point is set at the head of the multibyte form\n\ 248the actual point is set at the head of the multibyte form
248except in the case that `enable-multibyte-characters' is nil.") 249except 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
301DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, 302DEFUN ("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
308DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0, 309DEFUN ("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
315DEFUN ("mark-marker", Fmark_marker, Smark_marker, 0, 0, 0, 316DEFUN ("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.
317Watch out! Moving this marker changes the mark position.\n\ 318Watch out! Moving this marker changes the mark position.
318If you set the marker not to point anywhere, the buffer will have no mark.") 319If 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
558DEFUN ("delete-field", Fdelete_field, Sdelete_field, 0, 1, 0, 559DEFUN ("delete-field", Fdelete_field, Sdelete_field, 0, 1, 0,
559 "Delete the field surrounding POS.\n\ 560 /* Delete the field surrounding POS.
560A field is a region of text with the same `field' property.\n\ 561A field is a region of text with the same `field' property.
561If POS is nil, the value of point is used for POS.") 562If 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
572DEFUN ("field-string", Ffield_string, Sfield_string, 0, 1, 0, 573DEFUN ("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.
574A field is a region of text with the same `field' property.\n\ 575A field is a region of text with the same `field' property.
575If POS is nil, the value of point is used for POS.") 576If 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
584DEFUN ("field-string-no-properties", Ffield_string_no_properties, Sfield_string_no_properties, 0, 1, 0, 585DEFUN ("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.
586A field is a region of text with the same `field' property.\n\ 587A field is a region of text with the same `field' property.
587If POS is nil, the value of point is used for POS.") 588If 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
596DEFUN ("field-beginning", Ffield_beginning, Sfield_beginning, 0, 2, 0, 597DEFUN ("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.
598A field is a region of text with the same `field' property.\n\ 599A field is a region of text with the same `field' property.
599If POS is nil, the value of point is used for POS.\n\ 600If POS is nil, the value of point is used for POS.
600If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its\n\ 601If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its
601field, then the beginning of the *previous* field is returned.") 602field, 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
610DEFUN ("field-end", Ffield_end, Sfield_end, 0, 2, 0, 611DEFUN ("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.
612A field is a region of text with the same `field' property.\n\ 613A field is a region of text with the same `field' property.
613If POS is nil, the value of point is used for POS.\n\ 614If POS is nil, the value of point is used for POS.
614If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field,\n\ 615If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field,
615then the end of the *following* field is returned.") 616then 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
624DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, 625DEFUN ("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
627A field is a region of text with the same `field' property.\n\ 628A field is a region of text with the same `field' property.
628If NEW-POS is nil, then the current point is used instead, and set to the\n\ 629If NEW-POS is nil, then the current point is used instead, and set to the
629constrained position if that is different.\n\ 630constrained position if that is different.
630\n\ 631
631If OLD-POS is at the boundary of two fields, then the allowable\n\ 632If OLD-POS is at the boundary of two fields, then the allowable
632positions for NEW-POS depends on the value of the optional argument\n\ 633positions for NEW-POS depends on the value of the optional argument
633ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is\n\ 634ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is
634constrained to the field that has the same `field' char-property\n\ 635constrained to the field that has the same `field' char-property
635as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE\n\ 636as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE
636is non-nil, NEW-POS is constrained to the union of the two adjacent\n\ 637is non-nil, NEW-POS is constrained to the union of the two adjacent
637fields. Additionally, if two fields are separated by another field with\n\ 638fields. Additionally, if two fields are separated by another field with
638the special value `boundary', then any point within this special field is\n\ 639the special value `boundary', then any point within this special field is
639also considered to be `on the boundary'.\n\ 640also considered to be `on the boundary'.
640\n\ 641
641If the optional argument ONLY-IN-LINE is non-nil and constraining\n\ 642If the optional argument ONLY-IN-LINE is non-nil and constraining
642NEW-POS would move it to a different line, NEW-POS is returned\n\ 643NEW-POS would move it to a different line, NEW-POS is returned
643unconstrained. This useful for commands that move by line, like\n\ 644unconstrained. 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
645only in the case where they can still move to the right line.\n\ 646only in the case where they can still move to the right line.
646\n\ 647
647If the optional argument INHIBIT-CAPTURE-PROPERTY is non-nil, and OLD-POS has\n\ 648If the optional argument INHIBIT-CAPTURE-PROPERTY is non-nil, and OLD-POS has
648a non-nil property of that name, then any field boundaries are ignored.\n\ 649a non-nil property of that name, then any field boundaries are ignored.
649\n\ 650
650Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil.") 651Field 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
716DEFUN ("line-beginning-position", Fline_beginning_position, Sline_beginning_position, 717DEFUN ("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.
719With argument N not nil or 1, move forward N - 1 lines first.\n\ 720With argument N not nil or 1, move forward N - 1 lines first.
720If scan reaches end of buffer, return that position.\n\ 721If scan reaches end of buffer, return that position.
721The scan does not cross a field boundary unless it would move\n\ 722The scan does not cross a field boundary unless it would move
722beyond there to a different line. Field boundaries are not noticed if\n\ 723beyond 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,
724and scan starts at a field boundary, the scan stops as soon as it starts.\n\ 725and scan starts at a field boundary, the scan stops as soon as it starts.
725\n\ 726
726This function does not move point.") 727This 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
750DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 751DEFUN ("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.
753With argument N not nil or 1, move forward N - 1 lines first.\n\ 754With argument N not nil or 1, move forward N - 1 lines first.
754If scan reaches end of buffer, return that position.\n\ 755If scan reaches end of buffer, return that position.
755This function does not move point.") 756This 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
872DEFUN ("save-excursion", Fsave_excursion, Ssave_excursion, 0, UNEVALLED, 0, 873DEFUN ("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.
874Executes BODY just like `progn'.\n\ 875Executes BODY just like `progn'.
875The values of point, mark and the current buffer are restored\n\ 876The values of point, mark and the current buffer are restored
876even in case of abnormal exit (throw or error).\n\ 877even in case of abnormal exit (throw or error).
877The state of activation of the mark is also restored.\n\ 878The state of activation of the mark is also restored.
878\n\ 879
879This construct does not save `deactivate-mark', and therefore\n\ 880This construct does not save `deactivate-mark', and therefore
880functions that change the buffer will still cause deactivation\n\ 881functions that change the buffer will still cause deactivation
881of the mark at the end of the command. To prevent that, bind\n\ 882of 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
895DEFUN ("save-current-buffer", Fsave_current_buffer, Ssave_current_buffer, 0, UNEVALLED, 0, 896DEFUN ("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.
897Executes BODY just like `progn'.") 898Executes 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
910DEFUN ("buffer-size", Fbufsize, Sbufsize, 0, 1, 0, 911DEFUN ("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.
912If BUFFER, return the number of characters in that buffer instead.") 913If 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
926DEFUN ("point-min", Fpoint_min, Spoint_min, 0, 0, 0, 927DEFUN ("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.
928This is 1, unless narrowing (a buffer restriction) is in effect.") 929This 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
936DEFUN ("point-min-marker", Fpoint_min_marker, Spoint_min_marker, 0, 0, 0, 937DEFUN ("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.
938This is the beginning, unless narrowing (a buffer restriction) is in effect.") 939This 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
944DEFUN ("point-max", Fpoint_max, Spoint_max, 0, 0, 0, 945DEFUN ("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.
946This is (1+ (buffer-size)), unless narrowing (a buffer restriction)\n\ 947This is (1+ (buffer-size)), unless narrowing (a buffer restriction)
947is in effect, in which case it is less.") 948is 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
955DEFUN ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0, 956DEFUN ("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.
957This is (1+ (buffer-size)), unless narrowing (a buffer restriction)\n\ 958This is (1+ (buffer-size)), unless narrowing (a buffer restriction)
958is in effect, in which case it is less.") 959is 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
964DEFUN ("gap-position", Fgap_position, Sgap_position, 0, 0, 0, 965DEFUN ("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.
966See also `gap-size'.") 967See 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
974DEFUN ("gap-size", Fgap_size, Sgap_size, 0, 0, 0, 975DEFUN ("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.
976See also `gap-position'.") 977See 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
984DEFUN ("position-bytes", Fposition_bytes, Sposition_bytes, 1, 1, 0, 985DEFUN ("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.
986If POSITION is out of range, the value is nil.") 987If 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
996DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0, 997DEFUN ("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.
998If BYTEPOS is out of range, the value is nil.") 999If 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
1008DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, 1009DEFUN ("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.
1010At the end of the buffer or accessible region, return 0.") 1011At 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
1021DEFUN ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0, 1022DEFUN ("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.
1023At the beginning of the buffer or accessible region, return 0.") 1024At 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
1040DEFUN ("bobp", Fbobp, Sbobp, 0, 0, 0, 1041DEFUN ("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.
1042If the buffer is narrowed, this means the beginning of the narrowed part.") 1043If 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
1050DEFUN ("eobp", Feobp, Seobp, 0, 0, 0, 1051DEFUN ("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.
1052If the buffer is narrowed, this means the end of the narrowed part.") 1053If 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
1060DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, 1061DEFUN ("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
1069DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, 1070DEFUN ("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
1079DEFUN ("char-after", Fchar_after, Schar_after, 0, 1, 0, 1080DEFUN ("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.
1081POS is an integer or a marker.\n\ 1082POS is an integer or a marker.
1082If POS is out of range, the value is nil.") 1083If 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
1112DEFUN ("char-before", Fchar_before, Schar_before, 0, 1, 0, 1113DEFUN ("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.
1114POS is an integer or a marker.\n\ 1115POS is an integer or a marker.
1115If POS is out of range, the value is nil.") 1116If 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
1158DEFUN ("user-login-name", Fuser_login_name, Suser_login_name, 0, 1, 0, 1159DEFUN ("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.
1160This is based on the effective uid, not the real uid.\n\ 1161This is based on the effective uid, not the real uid.
1161Also, if the environment variable LOGNAME or USER is set,\n\ 1162Also, if the environment variable LOGNAME or USER is set,
1162that determines the value of this function.\n\n\ 1163that determines the value of this function.
1163If optional argument UID is an integer, return the login name of the user\n\ 1164
1164with that uid, or nil if there is no such user.") 1165If optional argument UID is an integer, return the login name of the user
1165 (uid) 1166with 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
1184DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name, 1186DEFUN ("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.
1187This ignores the environment variables LOGNAME and USER, so it differs from\n\ 1189This 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
1199DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0, 1201DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0,
1200 "Return the effective uid of Emacs.\n\ 1202 /* Return the effective uid of Emacs.
1201Value is an integer or float, depending on the value.") 1203Value 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
1207DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, 1209DEFUN ("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.
1209Value is an integer or float, depending on the value.") 1211Value 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
1215DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0, 1217DEFUN ("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.
1217If the full name corresponding to Emacs's userid is not known,\n\ 1219If the full name corresponding to Emacs's userid is not known,
1218return \"unknown\".\n\ 1220return "unknown".
1219\n\ 1221
1220If optional argument UID is an integer or float, return the full name\n\ 1222If optional argument UID is an integer or float, return the full name
1221of the user with that uid, or nil if there is no such user.\n\ 1223of the user with that uid, or nil if there is no such user.
1222If UID is a string, return the full name of the user with that login\n\ 1224If UID is a string, return the full name of the user with that login
1223name, or nil if there is no such user.") 1225name, 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
1271DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, 1273DEFUN ("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
1289DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, 1291DEFUN ("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
1296DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, 1298DEFUN ("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.
1298The time is returned as a list of three integers. The first has the\n\ 1300The time is returned as a list of three integers. The first has the
1299most significant 16 bits of the seconds, while the second has the\n\ 1301most significant 16 bits of the seconds, while the second has the
1300least significant 16 bits. The third integer gives the microsecond\n\ 1302least significant 16 bits. The third integer gives the microsecond
1301count.\n\ 1303count.
1302\n\ 1304
1303The microsecond count is zero on systems that do not provide\n\ 1305The microsecond count is zero on systems that do not provide
1304resolution finer than a second.") 1306resolution 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
1370DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0, 1372DEFUN ("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.
1372If an argument is given, it specifies a time to convert to float\n\ 1374If an argument is given, it specifies a time to convert to float
1373instead of the current time. The argument should have the forms:\n\ 1375instead 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).
1375Thus, you can use times obtained from `current-time'\n\ 1377Thus, you can use times obtained from `current-time'
1376and from `file-attributes'.\n\ 1378and from `file-attributes'.
1377\n\ 1379
1378WARNING: Since the result is floating point, it may not be exact.\n\ 1380WARNING: Since the result is floating point, it may not be exact.
1379Do not use this function if precise time stamps are required.") 1381Do 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/*
1447DEFUN ("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\
1449TIME is specified as (HIGH LOW . IGNORED) or (HIGH . LOW), as returned by\n\
1450`current-time' or `file-attributes'.\n\
1451The third, optional, argument UNIVERSAL, if non-nil, means describe TIME\n\
1452as Universal Time; nil means describe TIME in the local time zone.\n\
1453The value is a copy of FORMAT-STRING, but with certain constructs replaced\n\
1454by 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\
1482Finally, %n is a newline, %t is a tab, %% is a literal %.\n\
1483\n\
1484Certain flags and modifiers are available with some format controls.\n\
1485The flags are `_', `-', `^' and `#'. For certain characters X,\n\
1486%_X is like %X, but padded with blanks; %-X is like %X,\n\
1487ut without padding. %^X is like %X but with all textual\n\
1488characters up-cased; %#X is like %X but with letter-case of\n\
1489all textual characters reversed.\n\
1490%NX (where N stands for an integer) is like %X,\n\
1491but takes up at least N (a number) positions.\n\
1492The 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\
1496For example, to produce full ISO 8601 format, use \"%Y-%m-%dT%T%z\".")
1497 (format_string, time, universal)
1498*/
1499
1500DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, 1448DEFUN ("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) 1450TIME is specified as (HIGH LOW . IGNORED) or (HIGH . LOW), as returned by
1451`current-time' or `file-attributes'.
1452The third, optional, argument UNIVERSAL, if non-nil, means describe TIME
1453as Universal Time; nil means describe TIME in the local time zone.
1454The value is a copy of FORMAT-STRING, but with certain constructs replaced
1455by 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
1483Finally, %n is a newline, %t is a tab, %% is a literal %.
1484
1485Certain flags and modifiers are available with some format controls.
1486The flags are `_', `-', `^' and `#'. For certain characters X,
1487%_X is like %X, but padded with blanks; %-X is like %X,
1488ut without padding. %^X is like %X but with all textual
1489characters up-cased; %#X is like %X but with letter-case of
1490all textual characters reversed.
1491%NX (where N stands for an integer) is like %X,
1492but takes up at least N (a number) positions.
1493The 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
1497For 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
1549DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0, 1545DEFUN ("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).
1551The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED)\n\ 1547The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED)
1552or (HIGH . LOW), as from `current-time' and `file-attributes', or `nil'\n\ 1548or (HIGH . LOW), as from `current-time' and `file-attributes', or `nil'
1553to use the current time. The list has the following nine members:\n\ 1549to use the current time. The list has the following nine members:
1554SEC is an integer between 0 and 60; SEC is 60 for a leap second, which\n\ 1550SEC is an integer between 0 and 60; SEC is 60 for a leap second, which
1555only some operating systems support. MINUTE is an integer between 0 and 59.\n\ 1551only some operating systems support. MINUTE is an integer between 0 and 59.
1556HOUR is an integer between 0 and 23. DAY is an integer between 1 and 31.\n\ 1552HOUR is an integer between 0 and 23. DAY is an integer between 1 and 31.
1557MONTH is an integer between 1 and 12. YEAR is an integer indicating the\n\ 1553MONTH is an integer between 1 and 12. YEAR is an integer indicating the
1558four-digit year. DOW is the day of week, an integer between 0 and 6, where\n\ 1554four-digit year. DOW is the day of week, an integer between 0 and 6, where
15590 is Sunday. DST is t if daylight savings time is effect, otherwise nil.\n\ 15550 is Sunday. DST is t if daylight savings time is effect, otherwise nil.
1560ZONE is an integer indicating the number of seconds east of Greenwich.\n\ 1556ZONE 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
1595DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0, 1591DEFUN ("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.
1597This is the reverse operation of `decode-time', which see.\n\ 1593This is the reverse operation of `decode-time', which see.
1598ZONE defaults to the current time zone rule. This can\n\ 1594ZONE defaults to the current time zone rule. This can
1599be a string or t (as from `set-time-zone-rule'), or it can be a list\n\ 1595be 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')
1601applied without consideration for daylight savings time.\n\ 1597applied without consideration for daylight savings time.
1602\n\ 1598
1603You can pass more than 7 arguments; then the first six arguments\n\ 1599You can pass more than 7 arguments; then the first six arguments
1604are used as SECOND through YEAR, and the *last* argument is used as ZONE.\n\ 1600are used as SECOND through YEAR, and the *last* argument is used as ZONE.
1605The intervening arguments are ignored.\n\ 1601The intervening arguments are ignored.
1606This feature lets (apply 'encode-time (decode-time ...)) work.\n\ 1602This feature lets (apply 'encode-time (decode-time ...)) work.
1607\n\ 1603
1608Out-of-range values for SEC, MINUTE, HOUR, DAY, or MONTH are allowed;\n\ 1604Out-of-range values for SEC, MINUTE, HOUR, DAY, or MONTH are allowed;
1609for example, a DAY of 0 means the day preceding the given month.\n\ 1605for example, a DAY of 0 means the day preceding the given month.
1610Year numbers less than 100 are treated just like other year numbers.\n\ 1606Year numbers less than 100 are treated just like other year numbers.
1611If you want them to stand for years in this century, you must do that yourself.") 1607If 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
1680DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0, 1676DEFUN ("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.
1682Programs can use this function to decode a time,\n\ 1678Programs can use this function to decode a time,
1683since the number of columns in each field is fixed.\n\ 1679since the number of columns in each field is fixed.
1684The format is `Sun Sep 16 01:03:52 1973'.\n\ 1680The format is `Sun Sep 16 01:03:52 1973'.
1685However, see also the functions `decode-time' and `format-time-string'\n\ 1681However, see also the functions `decode-time' and `format-time-string'
1686which provide a much more powerful and general facility.\n\ 1682which provide a much more powerful and general facility.
1687\n\ 1683
1688If an argument is given, it specifies a time to format\n\ 1684If an argument is given, it specifies a time to format
1689instead of the current time. The argument should have the form:\n\ 1685instead of the current time. The argument should have the form:
1690 (HIGH . LOW)\n\ 1686 (HIGH . LOW)
1691or the form:\n\ 1687or the form:
1692 (HIGH LOW . IGNORED).\n\ 1688 (HIGH LOW . IGNORED).
1693Thus, you can use times obtained from `current-time'\n\ 1689Thus, you can use times obtained from `current-time'
1694and from `file-attributes'.") 1690and 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
1738DEFUN ("current-time-zone", Fcurrent_time_zone, Scurrent_time_zone, 0, 1, 0, 1734DEFUN ("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.
1740This returns a list of the form (OFFSET NAME).\n\ 1736This returns a list of the form (OFFSET NAME).
1741OFFSET is an integer number of seconds ahead of UTC (east of Greenwich).\n\ 1737OFFSET 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.
1743NAME is a string giving the name of the time zone.\n\ 1739NAME is a string giving the name of the time zone.
1744If an argument is given, it specifies when the time zone offset is determined\n\ 1740If an argument is given, it specifies when the time zone offset is determined
1745instead of using the current time. The argument should have the form:\n\ 1741instead of using the current time. The argument should have the form:
1746 (HIGH . LOW)\n\ 1742 (HIGH . LOW)
1747or the form:\n\ 1743or the form:
1748 (HIGH LOW . IGNORED).\n\ 1744 (HIGH LOW . IGNORED).
1749Thus, you can use times obtained from `current-time'\n\ 1745Thus, you can use times obtained from `current-time'
1750and from `file-attributes'.\n\ 1746and from `file-attributes'.
1751\n\ 1747
1752Some operating systems cannot provide all this information to Emacs;\n\ 1748Some operating systems cannot provide all this information to Emacs;
1753in this case, `current-time-zone' returns a list containing nil for\n\ 1749in this case, `current-time-zone' returns a list containing nil for
1754the data it can't find.") 1750the 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.")
1808static char **environbuf; 1804static char **environbuf;
1809 1805
1810DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0, 1806DEFUN ("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.
1812If TZ is nil, use implementation-defined default time zone information.\n\ 1808If TZ is nil, use implementation-defined default time zone information.
1813If TZ is t, use Universal Time.") 1809If 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
1997DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0, 1993DEFUN ("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.
1999Point and before-insertion markers move forward to end up\n\ 1995Point and before-insertion markers move forward to end up
2000 after the inserted text.\n\ 1996 after the inserted text.
2001Any other markers at the point of insertion remain before the text.\n\ 1997Any other markers at the point of insertion remain before the text.
2002\n\ 1998
2003If the current buffer is multibyte, unibyte strings are converted\n\ 1999If the current buffer is multibyte, unibyte strings are converted
2004to multibyte for insertion (see `unibyte-char-to-multibyte').\n\ 2000to multibyte for insertion (see `unibyte-char-to-multibyte').
2005If the current buffer is unibyte, multibyte strings are converted\n\ 2001If the current buffer is unibyte, multibyte strings are converted
2006to unibyte for insertion.") 2002to 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
2015DEFUN ("insert-and-inherit", Finsert_and_inherit, Sinsert_and_inherit, 2011DEFUN ("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.
2018Point and before-insertion markers move forward to end up\n\ 2014Point and before-insertion markers move forward to end up
2019 after the inserted text.\n\ 2015 after the inserted text.
2020Any other markers at the point of insertion remain before the text.\n\ 2016Any other markers at the point of insertion remain before the text.
2021\n\ 2017
2022If the current buffer is multibyte, unibyte strings are converted\n\ 2018If the current buffer is multibyte, unibyte strings are converted
2023to multibyte for insertion (see `unibyte-char-to-multibyte').\n\ 2019to multibyte for insertion (see `unibyte-char-to-multibyte').
2024If the current buffer is unibyte, multibyte strings are converted\n\ 2020If the current buffer is unibyte, multibyte strings are converted
2025to unibyte for insertion.") 2021to 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
2035DEFUN ("insert-before-markers", Finsert_before_markers, Sinsert_before_markers, 0, MANY, 0, 2031DEFUN ("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.
2037Point and markers move forward to end up after the inserted text.\n\ 2033Point and markers move forward to end up after the inserted text.
2038\n\ 2034
2039If the current buffer is multibyte, unibyte strings are converted\n\ 2035If the current buffer is multibyte, unibyte strings are converted
2040to multibyte for insertion (see `unibyte-char-to-multibyte').\n\ 2036to multibyte for insertion (see `unibyte-char-to-multibyte').
2041If the current buffer is unibyte, multibyte strings are converted\n\ 2037If the current buffer is unibyte, multibyte strings are converted
2042to unibyte for insertion.") 2038to 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
2053DEFUN ("insert-before-markers-and-inherit", Finsert_and_inherit_before_markers, 2049DEFUN ("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.
2056Point and markers move forward to end up after the inserted text.\n\ 2052Point and markers move forward to end up after the inserted text.
2057\n\ 2053
2058If the current buffer is multibyte, unibyte strings are converted\n\ 2054If the current buffer is multibyte, unibyte strings are converted
2059to multibyte for insertion (see `unibyte-char-to-multibyte').\n\ 2055to multibyte for insertion (see `unibyte-char-to-multibyte').
2060If the current buffer is unibyte, multibyte strings are converted\n\ 2056If the current buffer is unibyte, multibyte strings are converted
2061to unibyte for insertion.") 2057to 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
2072DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, 2068DEFUN ("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).
2074Both arguments are required.\n\ 2070Both arguments are required.
2075Point, and before-insertion markers, are relocated as in the function `insert'.\n\ 2071Point, and before-insertion markers, are relocated as in the function `insert'.
2076The optional third arg INHERIT, if non-nil, says to inherit text properties\n\ 2072The optional third arg INHERIT, if non-nil, says to inherit text properties
2077from adjoining text, if those properties are sticky.") 2073from 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
2228DEFUN ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0, 2224DEFUN ("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.
2230The two arguments START and END are character positions;\n\ 2226The two arguments START and END are character positions;
2231they can be in either order.\n\ 2227they can be in either order.
2232The string returned is multibyte if the buffer is multibyte.\n\ 2228The string returned is multibyte if the buffer is multibyte.
2233\n\ 2229
2234This function copies the text properties of that part of the buffer\n\ 2230This function copies the text properties of that part of the buffer
2235into the result string; if you don't want the text properties,\n\ 2231into the result string; if you don't want the text properties,
2236use `buffer-substring-no-properties' instead.") 2232use `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
2249DEFUN ("buffer-substring-no-properties", Fbuffer_substring_no_properties, 2245DEFUN ("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.
2252The two arguments START and END are character positions;\n\ 2248The two arguments START and END are character positions;
2253they can be in either order.") 2249they 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
2266DEFUN ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, 2262DEFUN ("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.
2268If narrowing is in effect, this function returns only the visible part\n\ 2264If narrowing is in effect, this function returns only the visible part
2269of the buffer.") 2265of 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
2275DEFUN ("insert-buffer-substring", Finsert_buffer_substring, Sinsert_buffer_substring, 2271DEFUN ("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.
2278BUFFER may be a buffer or a buffer name.\n\ 2274BUFFER may be a buffer or a buffer name.
2279Arguments START and END are character numbers specifying the substring.\n\ 2275Arguments START and END are character numbers specifying the substring.
2280They default to the beginning and the end of BUFFER.") 2276They 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
2325DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings, 2321DEFUN ("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.
2328the value is -N if first string is less after N-1 chars,\n\ 2324the 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.
2330Each substring is represented as three arguments: BUFFER, START and END.\n\ 2326Each substring is represented as three arguments: BUFFER, START and END.
2331That makes six args in all, three for each substring.\n\n\ 2327That makes six args in all, three for each substring.
2332The value of `case-fold-search' in the current buffer\n\ 2328
2333determines whether case is significant or ignored.") 2329The value of `case-fold-search' in the current buffer
2334 (buffer1, start1, end1, buffer2, start2, end2) 2330determines 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
2496DEFUN ("subst-char-in-region", Fsubst_char_in_region, 2493DEFUN ("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.
2499If optional arg NOUNDO is non-nil, don't record this change for undo\n\ 2496If optional arg NOUNDO is non-nil, don't record this change for undo
2500and don't mark the buffer as really changed.\n\ 2497and don't mark the buffer as really changed.
2501Both characters must have the same length of multi-byte form.") 2498Both 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
2664DEFUN ("translate-region", Ftranslate_region, Stranslate_region, 3, 3, 0, 2661DEFUN ("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.
2666TABLE is a string; the Nth character in it is the mapping\n\ 2663TABLE is a string; the Nth character in it is the mapping
2667for the character with code N.\n\ 2664for the character with code N.
2668This function does not alter multibyte characters.\n\ 2665This function does not alter multibyte characters.
2669It returns the number of characters changed.") 2666It 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
2753DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", 2750DEFUN ("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.
2755When called from a program, expects two arguments,\n\ 2752When called from a program, expects two arguments,
2756positions (integers or markers) specifying the stretch to be deleted.") 2753positions (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
2765DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, 2762DEFUN ("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
2775DEFUN ("widen", Fwiden, Swiden, 0, 0, "", 2772DEFUN ("widen", Fwiden, Swiden, 0, 0, "",
2776 "Remove restrictions (narrowing) from current buffer.\n\ 2773 /* Remove restrictions (narrowing) from current buffer.
2777This allows the buffer's full text to be seen and edited.") 2774This 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
2790DEFUN ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 2, "r", 2787DEFUN ("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.
2792The rest of the text becomes temporarily invisible and untouchable\n\ 2789The rest of the text becomes temporarily invisible and untouchable
2793but is not deleted; if you save the buffer in a file, the invisible\n\ 2790but is not deleted; if you save the buffer in a file, the invisible
2794text is included in the file. \\[widen] makes all visible again.\n\ 2791text is included in the file. \\[widen] makes all visible again.
2795See also `save-restriction'.\n\ 2792See also `save-restriction'.
2796\n\ 2793
2797When calling from a program, pass two arguments; positions (integers\n\ 2794When calling from a program, pass two arguments; positions (integers
2798or markers) bounding the text that should remain visible.") 2795or 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
2900DEFUN ("save-restriction", Fsave_restriction, Ssave_restriction, 0, UNEVALLED, 0, 2897DEFUN ("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.
2902The buffer's restrictions make parts of the beginning and end invisible.\n\ 2899The 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'.)
2904This special form, `save-restriction', saves the current buffer's restrictions\n\ 2901This special form, `save-restriction', saves the current buffer's restrictions
2905when it is entered, and restores them when it is exited.\n\ 2902when it is entered, and restores them when it is exited.
2906So any `narrow-to-region' within BODY lasts only until the end of the form.\n\ 2903So any `narrow-to-region' within BODY lasts only until the end of the form.
2907The old restrictions settings are restored\n\ 2904The old restrictions settings are restored
2908even in case of abnormal exit (throw or error).\n\ 2905even in case of abnormal exit (throw or error).
2909\n\ 2906
2910The value returned is the value of the last form in BODY.\n\ 2907The value returned is the value of the last form in BODY.
2911\n\ 2908
2912Note: if you are using both `save-excursion' and `save-restriction',\n\ 2909Note: if you are using both `save-excursion' and `save-restriction',
2913use `save-excursion' outermost:\n\ 2910use `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;
2930static int message_length; 2927static int message_length;
2931 2928
2932DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, 2929DEFUN ("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.
2934The first argument is a format control string, and the rest are data\n\ 2931The first argument is a format control string, and the rest are data
2935to be formatted under control of the string. See `format' for details.\n\ 2932to be formatted under control of the string. See `format' for details.
2936\n\ 2933
2937If the first argument is nil, clear any existing message; let the\n\ 2934If the first argument is nil, clear any existing message; let the
2938minibuffer contents show.") 2935minibuffer 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
2957DEFUN ("message-box", Fmessage_box, Smessage_box, 1, MANY, 0, 2954DEFUN ("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.
2959If a dialog box is not available, use the echo area.\n\ 2956If a dialog box is not available, use the echo area.
2960The first argument is a format control string, and the rest are data\n\ 2957The first argument is a format control string, and the rest are data
2961to be formatted under control of the string. See `format' for details.\n\ 2958to be formatted under control of the string. See `format' for details.
2962\n\ 2959
2963If the first argument is nil, clear any existing message; let the\n\ 2960If the first argument is nil, clear any existing message; let the
2964minibuffer contents show.") 2961minibuffer 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
3015DEFUN ("message-or-box", Fmessage_or_box, Smessage_or_box, 1, MANY, 0, 3012DEFUN ("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.
3017If this command was invoked with the mouse, use a dialog box if\n\ 3014If 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.
3019Otherwise, use the echo area.\n\ 3016Otherwise, use the echo area.
3020The first argument is a format control string, and the rest are data\n\ 3017The first argument is a format control string, and the rest are data
3021to be formatted under control of the string. See `format' for details.\n\ 3018to be formatted under control of the string. See `format' for details.
3022\n\ 3019
3023If the first argument is nil, clear any existing message; let the\n\ 3020If the first argument is nil, clear any existing message; let the
3024minibuffer contents show.") 3021minibuffer 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
3037DEFUN ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0, 3034DEFUN ("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
3045DEFUN ("propertize", Fpropertize, Spropertize, 3, MANY, 0, 3042DEFUN ("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.
3047First argument is the string to copy.\n\ 3044First argument is the string to copy.
3048Remaining arguments form a sequence of PROPERTY VALUE pairs for text\n\ 3045Remaining arguments form a sequence of PROPERTY VALUE pairs for text
3049properties to add to the result ") 3046properties 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
3091DEFUN ("format", Fformat, Sformat, 1, MANY, 0, 3088DEFUN ("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.
3093The first argument is a control string.\n\ 3090The first argument is a control string.
3094The other arguments are substituted into it to make the result, a string.\n\ 3091The other arguments are substituted into it to make the result, a string.
3095It may contain %-sequences meaning to substitute the next argument.\n\ 3092It 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.
3106Use %% to put a single % into the output.") 3103Use %% 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
3530DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0, 3527DEFUN ("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.
3532Both arguments must be characters (i.e. integers).\n\ 3529Both arguments must be characters (i.e. integers).
3533Case is ignored if `case-fold-search' is non-nil in the current buffer.") 3530Case 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
3639DEFUN ("transpose-regions", Ftranspose_regions, Stranspose_regions, 4, 5, 0, 3636DEFUN ("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.
3641The regions may not be overlapping, because the size of the buffer is\n\ 3638The regions may not be overlapping, because the size of the buffer is
3642never changed in a transposition.\n\ 3639never changed in a transposition.
3643\n\ 3640
3644Optional fifth arg LEAVE_MARKERS, if non-nil, means don't update\n\ 3641Optional fifth arg LEAVE_MARKERS, if non-nil, means don't update
3645any markers that happen to be located in the regions.\n\ 3642any markers that happen to be located in the regions.
3646\n\ 3643
3647Transposing beyond buffer boundaries is an error.") 3644Transposing 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.
3945Each function is called with two arguments which specify the range\n\ 3942Each function is called with two arguments which specify the range
3946of the buffer being accessed."); 3943of 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'
3965functions if all the text being accessed has this property."); 3962functions 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
193DEFUN ("set-minibuffer-window", Fset_minibuffer_window, 194DEFUN ("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.
196This effects where the minibuffer is displayed if you put text in it\n\ 197This effects where the minibuffer is displayed if you put text in it
197without invoking the usual minibuffer commands.") 198without 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
326DEFUN ("minibuffer-prompt-end", Fminibuffer_prompt_end, 327DEFUN ("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.
329Return (point-min) if current buffer is not a mini-buffer.") 330Return (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
342DEFUN ("minibuffer-contents", Fminibuffer_contents, 343DEFUN ("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.
345The current buffer must be a minibuffer.") 346The 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
352DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties, 353DEFUN ("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.
355The current buffer must be a minibuffer.") 356The 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
362DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents, 363DEFUN ("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.
365The current buffer must be a minibuffer.") 366The 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
847DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0, 848DEFUN ("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) 850If 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.
854Third arg KEYMAP is a keymap to use whilst reading;
855 if omitted or nil, the default is `minibuffer-local-map'.
856If 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))'
859Fifth 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.
867Sixth 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.
870Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
871 the current input method and the setting of enable-multibyte-characters.
872If 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
910DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, 936DEFUN ("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.
912Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS\n\ 938Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
913is a string to insert in the minibuffer before reading.") 939is 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
925DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, 951DEFUN ("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.
927Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS\n\ 953Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
928is a string to insert in the minibuffer before reading.") 954is 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
937DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, 963DEFUN ("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.
939If non-nil, second arg INITIAL-INPUT is a string to insert before reading.\n\ 965If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
940The third arg HISTORY, if non-nil, specifies a history list\n\ 966The 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.
942See `read-from-minibuffer' for details of HISTORY argument.\n\ 968See `read-from-minibuffer' for details of HISTORY argument.
943Fourth arg DEFAULT-VALUE is the default value. If non-nil, it is used\n\ 969Fourth 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.
946Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits\n\ 972Fifth 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
961DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 1, 3, 0, 987DEFUN ("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.
963Prompt with PROMPT, and provide INITIAL as an initial value of the input string.\n\ 989Prompt with PROMPT, and provide INITIAL as an initial value of the input string.
964Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits\n\ 990Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
965the current input method and the setting of enable-multibyte-characters.") 991the 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
978DEFUN ("read-command", Fread_command, Sread_command, 1, 2, 0, 1004DEFUN ("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.
980Prompts with PROMPT. By default, return DEFAULT-VALUE.") 1006Prompts 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
1001DEFUN ("read-function", Fread_function, Sread_function, 1, 1, 0, 1027DEFUN ("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.
1003Prompts with PROMPT.") 1029Prompts 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
1012DEFUN ("read-variable", Fread_variable, Sread_variable, 1, 2, 0, 1038DEFUN ("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.
1014Prompts with PROMPT. By default, return DEFAULT-VALUE.\n\ 1040Prompts with PROMPT. By default, return DEFAULT-VALUE.
1015A user variable is one whose documentation starts with a `*' character.") 1041A 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
1036DEFUN ("read-buffer", Fread_buffer, Sread_buffer, 1, 3, 0, 1062DEFUN ("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.
1038Prompts with PROMPT.\n\ 1064Prompts with PROMPT.
1039Optional second arg DEF is value to return if user enters an empty line.\n\ 1065Optional second arg DEF is value to return if user enters an empty line.
1040If optional third arg REQUIRE-MATCH is non-nil, only existing buffer names are allowed.") 1066If 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
1086DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0, 1112DEFUN ("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.
1088Each car of each element of ALIST is tested to see if it begins with STRING.\n\ 1114Each car of each element of ALIST is tested to see if it begins with STRING.
1089All that match are compared together; the longest initial sequence\n\ 1115All that match are compared together; the longest initial sequence
1090common to all matches is returned as a string.\n\ 1116common to all matches is returned as a string.
1091If there is no match at all, nil is returned.\n\ 1117If there is no match at all, nil is returned.
1092For a unique match which is exact, t is returned.\n\ 1118For a unique match which is exact, t is returned.
1093\n\ 1119
1094ALIST can be an obarray instead of an alist.\n\ 1120ALIST can be an obarray instead of an alist.
1095Then the print names of all symbols in the obarray are the possible matches.\n\ 1121Then the print names of all symbols in the obarray are the possible matches.
1096\n\ 1122
1097ALIST can also be a function to do the completion itself.\n\ 1123ALIST can also be a function to do the completion itself.
1098It receives three arguments: the values STRING, PREDICATE and nil.\n\ 1124It receives three arguments: the values STRING, PREDICATE and nil.
1099Whatever it returns becomes the value of `try-completion'.\n\ 1125Whatever it returns becomes the value of `try-completion'.
1100\n\ 1126
1101If optional third argument PREDICATE is non-nil,\n\ 1127If optional third argument PREDICATE is non-nil,
1102it is used to test each possible match.\n\ 1128it is used to test each possible match.
1103The match is a candidate only if PREDICATE returns non-nil.\n\ 1129The match is a candidate only if PREDICATE returns non-nil.
1104The argument given to PREDICATE is the alist element\n\ 1130The argument given to PREDICATE is the alist element
1105or the symbol from the obarray.\n\ 1131or the symbol from the obarray.
1106Additionally to this predicate, `completion-regexp-list'\n\ 1132Additionally to this predicate, `completion-regexp-list'
1107is used to further constrain the set of candidates.") 1133is 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
1337DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0, 1363DEFUN ("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.
1339Each car of each element of ALIST is tested to see if it begins with STRING.\n\ 1365Each car of each element of ALIST is tested to see if it begins with STRING.
1340The value is a list of all the strings from ALIST that match.\n\ 1366The value is a list of all the strings from ALIST that match.
1341\n\ 1367
1342ALIST can be an obarray instead of an alist.\n\ 1368ALIST can be an obarray instead of an alist.
1343Then the print names of all symbols in the obarray are the possible matches.\n\ 1369Then the print names of all symbols in the obarray are the possible matches.
1344\n\ 1370
1345ALIST can also be a function to do the completion itself.\n\ 1371ALIST can also be a function to do the completion itself.
1346It receives three arguments: the values STRING, PREDICATE and t.\n\ 1372It receives three arguments: the values STRING, PREDICATE and t.
1347Whatever it returns becomes the value of `all-completions'.\n\ 1373Whatever it returns becomes the value of `all-completions'.
1348\n\ 1374
1349If optional third argument PREDICATE is non-nil,\n\ 1375If optional third argument PREDICATE is non-nil,
1350it is used to test each possible match.\n\ 1376it is used to test each possible match.
1351The match is a candidate only if PREDICATE returns non-nil.\n\ 1377The match is a candidate only if PREDICATE returns non-nil.
1352The argument given to PREDICATE is the alist element\n\ 1378The argument given to PREDICATE is the alist element
1353or the symbol from the obarray.\n\ 1379or the symbol from the obarray.
1354Additionally to this predicate, `completion-regexp-list'\n\ 1380Additionally to this predicate, `completion-regexp-list'
1355is used to further constrain the set of candidates.\n\ 1381is used to further constrain the set of candidates.
1356\n\ 1382
1357If the optional fourth argument HIDE-SPACES is non-nil,\n\ 1383If the optional fourth argument HIDE-SPACES is non-nil,
1358strings in ALIST that start with a space\n\ 1384strings in ALIST that start with a space
1359are ignored unless STRING itself starts with a space.") 1385are 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;
1479Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm; 1505Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm;
1480Lisp_Object Vminibuffer_completing_file_name; 1506Lisp_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
1486DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0,
1487 "Read a string in the minibuffer, with completion.\n\
1488PROMPT is a string to prompt with; normally it ends in a colon and a space.\n\
1489TABLE is an alist whose elements' cars are strings, or an obarray.\n\
1490TABLE can also be a function to do the completion itself.\n\
1491PREDICATE limits completion to a subset of TABLE.\n\
1492See `try-completion' and `all-completions' for more details\n\
1493 on completion, TABLE, and PREDICATE.\n\
1494\n\
1495If 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\
1498If the input is null, `completing-read' returns an empty string,\n\
1499 regardless of the value of REQUIRE-MATCH.\n\
1500\n\
1501If 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\
1505HIST, 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\
1513DEF, if non-nil, is the default value.\n\
1514\n\
1515If 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\
1518Completion ignores case if the ambient value of\n\
1519 `completion-ignore-case' is non-nil."
1520*/
1521DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, 1508DEFUN ("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) 1510PROMPT is a string to prompt with; normally it ends in a colon and a space.
1511TABLE is an alist whose elements' cars are strings, or an obarray.
1512TABLE can also be a function to do the completion itself.
1513PREDICATE limits completion to a subset of TABLE.
1514See `try-completion' and `all-completions' for more details
1515 on completion, TABLE, and PREDICATE.
1516
1517If 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.
1520If the input is null, `completing-read' returns an empty string,
1521 regardless of the value of REQUIRE-MATCH.
1522
1523If 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.
1527HIST, 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.
1535DEF, if non-nil, is the default value.
1536
1537If INHERIT-INPUT-METHOD is non-nil, the minibuffer inherits
1538 the current input method and the setting of enable-multibyte-characters.
1539
1540Completion 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
1757DEFUN ("minibuffer-complete", Fminibuffer_complete, Sminibuffer_complete, 0, 0, "", 1776DEFUN ("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.
1759Return nil if there is no valid completion, else t.\n\ 1778Return nil if there is no valid completion, else t.
1760If no characters can be completed, display a list of possible completions.\n\ 1779If no characters can be completed, display a list of possible completions.
1761If you repeat this command after it displayed such a list,\n\ 1780If you repeat this command after it displayed such a list,
1762scroll the window of possible completions.") 1781scroll 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
1836DEFUN ("minibuffer-complete-and-exit", Fminibuffer_complete_and_exit, 1855DEFUN ("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.
1839Otherwise try to complete it. If completion leads to a valid completion,\n\ 1858Otherwise try to complete it. If completion leads to a valid completion,
1840a repetition of this command will exit.") 1859a 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
1881DEFUN ("minibuffer-complete-word", Fminibuffer_complete_word, Sminibuffer_complete_word, 1900DEFUN ("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.
1884After one word is completed as much as possible, a space or hyphen\n\ 1903After one word is completed as much as possible, a space or hyphen
1885is added, provided that matches some possible completion.\n\ 1904is added, provided that matches some possible completion.
1886Return nil if there is no valid completion, else t.") 1905Return 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
2054DEFUN ("display-completion-list", Fdisplay_completion_list, Sdisplay_completion_list, 2073DEFUN ("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'.
2057Each element may be just a symbol or string\n\ 2076Each element may be just a symbol or string
2058or may be a list of two strings to be printed as if concatenated.\n\ 2077or 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.
2060The actual completion alternatives, as inserted, are given `mouse-face'\n\ 2079The actual completion alternatives, as inserted, are given `mouse-face'
2061properties of `highlight'.\n\ 2080properties of `highlight'.
2062At the end, this runs the normal hook `completion-setup-hook'.\n\ 2081At the end, this runs the normal hook `completion-setup-hook'.
2063It can find the completion buffer in `standard-output'.") 2082It 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
2237DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_completion_help, 2256DEFUN ("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
2263DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0, 0, "", 2282DEFUN ("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
2275DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "", 2294DEFUN ("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
2282DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0, 2301DEFUN ("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
2289DEFUN ("minibuffer-prompt", Fminibuffer_prompt, Sminibuffer_prompt, 0, 0, 0, 2308DEFUN ("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.
2291If no minibuffer is active, return nil.") 2310If 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
2333DEFUN ("minibuffer-message", Fminibuffer_message, Sminibuffer_message, 2352DEFUN ("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.
2336The text is displayed for two seconds,\n\ 2355The text is displayed for two seconds,
2337or until the next input event arrives, whichever comes first.") 2356or 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.
2423A number means that length; t means infinite. Truncation takes place\n\ 2442A number means that length; t means infinite. Truncation takes place
2424just after a new element is inserted. Setting the history-length\n\ 2443just after a new element is inserted. Setting the history-length
2425property of a history variable overrides this default."); 2444property 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.
2438This variable makes a difference whenever the minibuffer window is active."); 2457This 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.
2443This becomes the ALIST argument to `try-completion' and `all-completion'.\n\ 2462This becomes the ALIST argument to `try-completion' and `all-completion'.
2444\n\ 2463
2445The value may alternatively be a function, which is given three arguments:\n\ 2464The 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.
2449CODE can be nil, t or `lambda'.\n\ 2468CODE can be nil, t or `lambda'.
2450nil means to return the best completion of STRING, or nil if there is none.\n\ 2469nil means to return the best completion of STRING, or nil if there is none.
2451t means to return a list of all possible completions of STRING.\n\ 2470t 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.
2474Each string of minibuffer input, as it appears on exit from the minibuffer,\n\ 2493Each string of minibuffer input, as it appears on exit from the minibuffer,
2475is added with\n\ 2494is 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.
2486Some uses of the echo area also raise that frame (since they use it too)."); 2505Some 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.
2496This also affects `read-string', but it does not affect `read-minibuffer',\n\ 2515This 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
2498with completion; they always discard text properties."); 2517with 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.
2503These are in addition to the basic `field' property, and stickiness\n\ 2522These are in addition to the basic `field' property, and stickiness
2504properties."); 2523properties. */);
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