diff options
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 03be8d1ff9f..cf0cbca77c1 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -150,12 +150,9 @@ static void run_exit_minibuf_hook (void); static Lisp_Object string_to_object (Lisp_Object val, Lisp_Object defalt) { - struct gcpro gcpro1, gcpro2; Lisp_Object expr_and_pos; ptrdiff_t pos; - GCPRO2 (val, defalt); - if (STRINGP (val) && SCHARS (val) == 0) { if (STRINGP (defalt)) @@ -181,7 +178,7 @@ string_to_object (Lisp_Object val, Lisp_Object defalt) } val = Fcar (expr_and_pos); - RETURN_UNGCPRO (val); + return val; } @@ -384,7 +381,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, Lisp_Object val; ptrdiff_t count = SPECPDL_INDEX (); Lisp_Object mini_frame, ambient_dir, minibuffer, input_method; - struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; Lisp_Object enable_multibyte; EMACS_INT pos = 0; /* String to add to the history. */ @@ -437,11 +433,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, input_method = Qnil; enable_multibyte = Qnil; - /* Don't need to protect PROMPT, HISTVAR, and HISTPOS because we - store them away before we can GC. Don't need to protect - BACKUP_N because we use the value only if it is an integer. */ - GCPRO5 (map, initial, val, ambient_dir, input_method); - if (!STRINGP (prompt)) prompt = empty_unibyte_string; @@ -466,7 +457,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, make_number (pos), expflag, histvar, histpos, defalt, allow_props, inherit_input_method); - UNGCPRO; return unbind_to (count, val); } @@ -758,7 +748,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, /* The appropriate frame will get selected in set-window-configuration. */ - UNGCPRO; return unbind_to (count, val); } @@ -936,7 +925,6 @@ and some related functions, which use zero-indexing for POSITION. */) (Lisp_Object prompt, Lisp_Object initial_contents, Lisp_Object keymap, Lisp_Object read, Lisp_Object hist, Lisp_Object default_value, Lisp_Object inherit_input_method) { Lisp_Object histvar, histpos, val; - struct gcpro gcpro1; CHECK_STRING (prompt); if (NILP (keymap)) @@ -959,13 +947,11 @@ and some related functions, which use zero-indexing for POSITION. */) if (NILP (histpos)) XSETFASTINT (histpos, 0); - GCPRO1 (default_value); val = read_minibuf (keymap, initial_contents, prompt, !NILP (read), histvar, histpos, default_value, minibuffer_allow_text_properties, !NILP (inherit_input_method)); - UNGCPRO; return val; } @@ -1212,7 +1198,6 @@ is used to further constrain the set of candidates. */) int matchcount = 0; ptrdiff_t bindcount = -1; Lisp_Object bucket, zero, end, tem; - struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; CHECK_STRING (string); if (type == function_table) @@ -1325,13 +1310,11 @@ is used to further constrain the set of candidates. */) unbind_to (bindcount, Qnil); bindcount = -1; } - GCPRO4 (tail, string, eltstring, bestmatch); tem = (type == hash_table ? call2 (predicate, elt, HASH_VALUE (XHASH_TABLE (collection), idx - 1)) : call1 (predicate, elt)); - UNGCPRO; } if (NILP (tem)) continue; } @@ -1469,7 +1452,6 @@ with a space are ignored unless STRING itself starts with a space. */) ptrdiff_t idx = 0, obsize = 0; ptrdiff_t bindcount = -1; Lisp_Object bucket, tem, zero; - struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; CHECK_STRING (string); if (type == 0) @@ -1587,12 +1569,10 @@ with a space are ignored unless STRING itself starts with a space. */) unbind_to (bindcount, Qnil); bindcount = -1; } - GCPRO4 (tail, eltstring, allmatches, string); tem = type == 3 ? call2 (predicate, elt, HASH_VALUE (XHASH_TABLE (collection), idx - 1)) : call1 (predicate, elt); - UNGCPRO; } if (NILP (tem)) continue; } |