Mercurial > emacs
comparison src/minibuf.c @ 5376:eb9c60c0cfe8
(read_from_minibuffer): Rename arg initial_input to initial_contents.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 30 Dec 1993 16:43:05 +0000 |
parents | 409c8dd33f42 |
children | 4a1c5b2c005d |
comparison
equal
deleted
inserted
replaced
5375:0e30cf7aa525 | 5376:eb9c60c0cfe8 |
---|---|
390 Positions are counted starting from 1 at the beginning of the list." | 390 Positions are counted starting from 1 at the beginning of the list." |
391 */ | 391 */ |
392 | 392 |
393 DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 5, 0, | 393 DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 5, 0, |
394 0 /* See immediately above */) | 394 0 /* See immediately above */) |
395 (prompt, initial_input, keymap, read, hist) | 395 (prompt, initial_contents, keymap, read, hist) |
396 Lisp_Object prompt, initial_input, keymap, read, hist; | 396 Lisp_Object prompt, initial_contents, keymap, read, hist; |
397 { | 397 { |
398 int pos = 0; | 398 int pos = 0; |
399 Lisp_Object histvar, histpos, position; | 399 Lisp_Object histvar, histpos, position; |
400 position = Qnil; | 400 position = Qnil; |
401 | 401 |
402 CHECK_STRING (prompt, 0); | 402 CHECK_STRING (prompt, 0); |
403 if (!NILP (initial_input)) | 403 if (!NILP (initial_contents)) |
404 { | 404 { |
405 if (XTYPE (initial_input) == Lisp_Cons) | 405 if (XTYPE (initial_contents) == Lisp_Cons) |
406 { | 406 { |
407 position = Fcdr (initial_input); | 407 position = Fcdr (initial_contents); |
408 initial_input = Fcar (initial_input); | 408 initial_contents = Fcar (initial_contents); |
409 } | 409 } |
410 CHECK_STRING (initial_input, 1); | 410 CHECK_STRING (initial_contents, 1); |
411 if (!NILP (position)) | 411 if (!NILP (position)) |
412 { | 412 { |
413 CHECK_NUMBER (position, 0); | 413 CHECK_NUMBER (position, 0); |
414 /* Convert to distance from end of input. */ | 414 /* Convert to distance from end of input. */ |
415 pos = XINT (position) - 1 - XSTRING (initial_input)->size; | 415 pos = XINT (position) - 1 - XSTRING (initial_contents)->size; |
416 } | 416 } |
417 } | 417 } |
418 | 418 |
419 if (NILP (keymap)) | 419 if (NILP (keymap)) |
420 keymap = Vminibuffer_local_map; | 420 keymap = Vminibuffer_local_map; |
434 if (NILP (histvar)) | 434 if (NILP (histvar)) |
435 histvar = Qminibuffer_history; | 435 histvar = Qminibuffer_history; |
436 if (NILP (histpos)) | 436 if (NILP (histpos)) |
437 XFASTINT (histpos) = 0; | 437 XFASTINT (histpos) = 0; |
438 | 438 |
439 return read_minibuf (keymap, initial_input, prompt, | 439 return read_minibuf (keymap, initial_contents, prompt, |
440 make_number (pos), !NILP (read), histvar, histpos); | 440 make_number (pos), !NILP (read), histvar, histpos); |
441 } | 441 } |
442 | 442 |
443 DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, | 443 DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, |
444 "Return a Lisp object read using the minibuffer.\n\ | 444 "Return a Lisp object read using the minibuffer.\n\ |