comparison src/minibuf.c @ 20:859a2309aef8 r19-15b93

Import from CVS: tag r19-15b93
author cvs
date Mon, 13 Aug 2007 08:50:05 +0200
parents 0293115a14e9
children e04119814345
comparison
equal deleted inserted replaced
19:ac1f612d5250 20:859a2309aef8
56 56
57 Lisp_Object Qappend_message, Qcurrent_message_label, 57 Lisp_Object Qappend_message, Qcurrent_message_label,
58 Qclear_message, Qdisplay_message; 58 Qclear_message, Qdisplay_message;
59 59
60 60
61 DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0 /* 61 DEFUN ("minibuffer-depth", Fminibuffer_depth, 0, 0, 0, /*
62 Return current depth of activations of minibuffer, a nonnegative integer. 62 Return current depth of activations of minibuffer, a nonnegative integer.
63 */ ) 63 */
64 () 64 ())
65 { 65 {
66 return make_int (minibuf_level); 66 return make_int (minibuf_level);
67 } 67 }
68 68
69 /* The default buffer to use as the window-buffer of minibuffer windows */ 69 /* The default buffer to use as the window-buffer of minibuffer windows */
104 } 104 }
105 105
106 return Qnil; 106 return Qnil;
107 } 107 }
108 108
109 DEFUN ("read-minibuffer-internal", 109 DEFUN ("read-minibuffer-internal", Fread_minibuffer_internal, 1, 1, 0, /*
110 Fread_minibuffer_internal, Sread_minibuffer_internal,
111 1, 1, 0 /*
112 Lowest-level interface to minibuffers. Don't call this. 110 Lowest-level interface to minibuffers. Don't call this.
113 */ ) 111 */
114 (prompt) 112 (prompt))
115 Lisp_Object prompt;
116 { 113 {
117 /* This function can GC */ 114 /* This function can GC */
118 int speccount = specpdl_depth (); 115 int speccount = specpdl_depth ();
119 Lisp_Object val; 116 Lisp_Object val;
120 117
267 } 264 }
268 265
269 266
270 267
271 268
272 DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0 /* 269 DEFUN ("try-completion", Ftry_completion, 2, 3, 0, /*
273 Return common substring of all completions of STRING in ALIST. 270 Return common substring of all completions of STRING in ALIST.
274 Each car of each element of ALIST is tested to see if it begins with STRING. 271 Each car of each element of ALIST is tested to see if it begins with STRING.
275 All that match are compared together; the longest initial sequence 272 All that match are compared together; the longest initial sequence
276 common to all matches is returned as a string. 273 common to all matches is returned as a string.
277 If there is no match at all, nil is returned. 274 If there is no match at all, nil is returned.
286 283
287 If optional third argument PREDICATE is non-nil, 284 If optional third argument PREDICATE is non-nil,
288 it is used to test each possible match. 285 it is used to test each possible match.
289 The match is a candidate only if PREDICATE returns non-nil. 286 The match is a candidate only if PREDICATE returns non-nil.
290 The argument given to PREDICATE is the alist element or the symbol from the obarray. 287 The argument given to PREDICATE is the alist element or the symbol from the obarray.
291 */ ) 288 */
292 (string, alist, pred) 289 (string, alist, pred))
293 Lisp_Object string, alist, pred;
294 { 290 {
295 /* This function can GC */ 291 /* This function can GC */
296 Lisp_Object bestmatch, tail; 292 Lisp_Object bestmatch, tail;
297 Charcount bestmatchsize = 0; 293 Charcount bestmatchsize = 0;
298 int list; 294 int list;
470 /* Else extract the part in which all completions agree */ 466 /* Else extract the part in which all completions agree */
471 return Fsubstring (bestmatch, Qzero, make_int (bestmatchsize)); 467 return Fsubstring (bestmatch, Qzero, make_int (bestmatchsize));
472 } 468 }
473 469
474 470
475 DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 3, 0 /* 471 DEFUN ("all-completions", Fall_completions, 2, 3, 0, /*
476 Search for partial matches to STRING in ALIST. 472 Search for partial matches to STRING in ALIST.
477 Each car of each element of ALIST is tested to see if it begins with STRING. 473 Each car of each element of ALIST is tested to see if it begins with STRING.
478 The value is a list of all the strings from ALIST that match. 474 The value is a list of all the strings from ALIST that match.
479 ALIST can be an obarray instead of an alist. 475 ALIST can be an obarray instead of an alist.
480 Then the print names of all symbols in the obarray are the possible matches. 476 Then the print names of all symbols in the obarray are the possible matches.
486 If optional third argument PREDICATE is non-nil, 482 If optional third argument PREDICATE is non-nil,
487 it is used to test each possible match. 483 it is used to test each possible match.
488 The match is a candidate only if PREDICATE returns non-nil. 484 The match is a candidate only if PREDICATE returns non-nil.
489 The argument given to PREDICATE is the alist element or 485 The argument given to PREDICATE is the alist element or
490 the symbol from the obarray. 486 the symbol from the obarray.
491 */ ) 487 */
492 (string, alist, pred) 488 (string, alist, pred))
493 Lisp_Object string, alist, pred;
494 { 489 {
495 /* This function can GC */ 490 /* This function can GC */
496 Lisp_Object tail; 491 Lisp_Object tail;
497 Lisp_Object allmatches; 492 Lisp_Object allmatches;
498 int list; 493 int list;
863 { 858 {
864 defsymbol (&Qminibuffer_setup_hook, "minibuffer-setup-hook"); 859 defsymbol (&Qminibuffer_setup_hook, "minibuffer-setup-hook");
865 860
866 defsymbol (&Qcompletion_ignore_case, "completion-ignore-case"); 861 defsymbol (&Qcompletion_ignore_case, "completion-ignore-case");
867 862
868 defsubr (&Sminibuffer_depth); 863 DEFSUBR (Fminibuffer_depth);
869 #if 0 864 #if 0
870 defsubr (&Sminibuffer_prompt); 865 DEFSUBR (Fminibuffer_prompt);
871 defsubr (&Sminibuffer_prompt_width); 866 DEFSUBR (Fminibuffer_prompt_width);
872 #endif 867 #endif
873 868
874 defsubr (&Sread_minibuffer_internal); 869 DEFSUBR (Fread_minibuffer_internal);
875 870
876 defsubr (&Stry_completion); 871 DEFSUBR (Ftry_completion);
877 defsubr (&Sall_completions); 872 DEFSUBR (Fall_completions);
878 873
879 defsymbol (&Qappend_message, "append-message"); 874 defsymbol (&Qappend_message, "append-message");
880 defsymbol (&Qclear_message, "clear-message"); 875 defsymbol (&Qclear_message, "clear-message");
881 defsymbol (&Qdisplay_message, "display-message"); 876 defsymbol (&Qdisplay_message, "display-message");
882 defsymbol (&Qcurrent_message_label, "current-message-label"); 877 defsymbol (&Qcurrent_message_label, "current-message-label");