aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Raeburn2005-12-06 07:39:57 +0000
committerKen Raeburn2005-12-06 07:39:57 +0000
commit7723a3e52b00e7db534d576b5e3701a9defe63c4 (patch)
tree19c31bed2c80f7a811d8919e7499051d0da39206
parenta3911e8c0ad15d6f571d7447474e31b35e7e670d (diff)
downloademacs-7723a3e52b00e7db534d576b5e3701a9defe63c4.tar.gz
emacs-7723a3e52b00e7db534d576b5e3701a9defe63c4.zip
(Fminibuffer_complete_and_exit): Avoid dangerous side effects in NILP argument.
-rw-r--r--src/minibuf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index e7df7bd0153..76529bf86e6 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2116,16 +2116,17 @@ a repetition of this command will exit. */)
2116 () 2116 ()
2117{ 2117{
2118 register int i; 2118 register int i;
2119 Lisp_Object val; 2119 Lisp_Object val, tem;
2120 2120
2121 /* Allow user to specify null string */ 2121 /* Allow user to specify null string */
2122 if (XINT (Fminibuffer_prompt_end ()) == ZV) 2122 if (XINT (Fminibuffer_prompt_end ()) == ZV)
2123 goto exit; 2123 goto exit;
2124 2124
2125 val = Fminibuffer_contents (); 2125 val = Fminibuffer_contents ();
2126 if (!NILP (Ftest_completion (val, 2126 tem = Ftest_completion (val,
2127 Vminibuffer_completion_table, 2127 Vminibuffer_completion_table,
2128 Vminibuffer_completion_predicate))) 2128 Vminibuffer_completion_predicate);
2129 if (!NILP (tem))
2129 { 2130 {
2130 if (completion_ignore_case) 2131 if (completion_ignore_case)
2131 { /* Fixup case of the field, if necessary. */ 2132 { /* Fixup case of the field, if necessary. */