aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-05-15 02:28:12 +0000
committerRichard M. Stallman1997-05-15 02:28:12 +0000
commit1d8d92f4fe0fc2d1d0d0d4d56e7bcbf1ca031a99 (patch)
treef09504d0b54395ae5258632a81787c755db09515
parentc0c15b93398f689277e3e698dd12368475bfc978 (diff)
downloademacs-1d8d92f4fe0fc2d1d0d0d4d56e7bcbf1ca031a99.tar.gz
emacs-1d8d92f4fe0fc2d1d0d0d4d56e7bcbf1ca031a99.zip
(Fread_from_minibuffer): Add gcpro.
-rw-r--r--src/minibuf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 6395860f826..b8c44e23447 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -548,7 +548,7 @@ read_minibuf_unwind (data)
548 for make-docfile to see. We cannot put this in the real DEFUN 548 for make-docfile to see. We cannot put this in the real DEFUN
549 due to limits in the Unix cpp. 549 due to limits in the Unix cpp.
550 550
551DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 5, 0, 551DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 6, 0,
552 "Read a string from the minibuffer, prompting with string PROMPT.\n\ 552 "Read a string from the minibuffer, prompting with string PROMPT.\n\
553If optional second arg INITIAL-CONTENTS is non-nil, it is a string\n\ 553If optional second arg INITIAL-CONTENTS is non-nil, it is a string\n\
554 to be inserted into the minibuffer before reading input.\n\ 554 to be inserted into the minibuffer before reading input.\n\
@@ -579,6 +579,8 @@ DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1,
579{ 579{
580 int pos = 0; 580 int pos = 0;
581 Lisp_Object histvar, histpos, position, val; 581 Lisp_Object histvar, histpos, position, val;
582 struct gcpro gcpro1;
583
582 position = Qnil; 584 position = Qnil;
583 585
584 CHECK_STRING (prompt, 0); 586 CHECK_STRING (prompt, 0);
@@ -622,11 +624,13 @@ DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1,
622 if (NILP (histpos)) 624 if (NILP (histpos))
623 XSETFASTINT (histpos, 0); 625 XSETFASTINT (histpos, 0);
624 626
627 GCPRO1 (default_value);
625 val = read_minibuf (keymap, initial_contents, prompt, 628 val = read_minibuf (keymap, initial_contents, prompt,
626 make_number (pos), !NILP (read), 629 make_number (pos), !NILP (read),
627 histvar, histpos, default_value); 630 histvar, histpos, default_value);
628 if (STRINGP (val) && XSTRING (val)->size == 0 && ! NILP (default_value)) 631 if (STRINGP (val) && XSTRING (val)->size == 0 && ! NILP (default_value))
629 val = default_value; 632 val = default_value;
633 UNGCPRO;
630 return val; 634 return val;
631} 635}
632 636