# HG changeset patch # User Karl Heuer # Date 765586434 0 # Node ID 2efd8c4eb9be89a7545c71c1228078a401566791 # Parent 1102eac526d8e9f9fb0015f8660f7faf33607b14 (do_completion): gcpro some things. diff -r 1102eac526d8 -r 2efd8c4eb9be src/minibuf.c --- a/src/minibuf.c Tue Apr 05 21:54:51 1994 +0000 +++ b/src/minibuf.c Tue Apr 05 22:53:54 1994 +0000 @@ -1045,7 +1045,9 @@ Lisp_Object completion, tem; int completedp; Lisp_Object last; + struct gcpro gcpro1, gcpro2; + GCPRO2 (completion, last); completion = Ftry_completion (Fbuffer_string (), Vminibuffer_completion_table, Vminibuffer_completion_predicate); last = last_exact_completion; @@ -1055,11 +1057,15 @@ { bitch_at_user (); temp_echo_area_glyphs (" [No match]"); + UNGCPRO; return 0; } if (EQ (completion, Qt)) /* exact and unique match */ - return 1; + { + UNGCPRO; + return 1; + } /* compiler bug */ tem = Fstring_equal (completion, Fbuffer_string()); @@ -1097,7 +1103,9 @@ Qlambda); if (NILP (tem)) - { /* not an exact match */ + { + /* not an exact match */ + UNGCPRO; if (completedp) return 5; else if (auto_help) @@ -1107,7 +1115,10 @@ return 6; } else if (completedp) - return 4; + { + UNGCPRO; + return 4; + } /* If the last exact completion and this one were the same, it means we've already given a "Complete but not unique" message and the user's hit TAB again, so now we give him help. */ @@ -1118,9 +1129,10 @@ if (!NILP (Fequal (tem, last))) Fminibuffer_completion_help (); } + UNGCPRO; return 3; } - + /* Like assoc but assumes KEY is a string, and ignores case if appropriate. */ Lisp_Object @@ -1562,6 +1574,9 @@ Qminibuffer_completion_predicate = intern ("minibuffer-completion-predicate"); staticpro (&Qminibuffer_completion_predicate); + staticpro (&last_exact_completion); + last_exact_completion = Qnil; + staticpro (&last_minibuf_string); last_minibuf_string = Qnil;