comparison src/minibuf.c @ 53312:93fc4ea3546c

(Fcompleting_read): Undo previous change.
author Luc Teirlinck <teirllm@auburn.edu>
date Thu, 25 Dec 2003 17:31:23 +0000
parents 9bb418538a0f
children d4539e5181a1
comparison
equal deleted inserted replaced
53311:340af9abe9d0 53312:93fc4ea3546c
1576 `completion-ignore-case' is non-nil. */) 1576 `completion-ignore-case' is non-nil. */)
1577 (prompt, table, predicate, require_match, initial_input, hist, def, inherit_input_method) 1577 (prompt, table, predicate, require_match, initial_input, hist, def, inherit_input_method)
1578 Lisp_Object prompt, table, predicate, require_match, initial_input; 1578 Lisp_Object prompt, table, predicate, require_match, initial_input;
1579 Lisp_Object hist, def, inherit_input_method; 1579 Lisp_Object hist, def, inherit_input_method;
1580 { 1580 {
1581 Lisp_Object val, histvar, histpos; 1581 Lisp_Object val, histvar, histpos, position;
1582 Lisp_Object init;
1583 int pos = 0;
1582 int count = SPECPDL_INDEX (); 1584 int count = SPECPDL_INDEX ();
1583 struct gcpro gcpro1; 1585 struct gcpro gcpro1;
1584 1586
1587 init = initial_input;
1585 GCPRO1 (def); 1588 GCPRO1 (def);
1586 1589
1587 specbind (Qminibuffer_completion_table, table); 1590 specbind (Qminibuffer_completion_table, table);
1588 specbind (Qminibuffer_completion_predicate, predicate); 1591 specbind (Qminibuffer_completion_predicate, predicate);
1589 specbind (Qminibuffer_completion_confirm, 1592 specbind (Qminibuffer_completion_confirm,
1590 EQ (require_match, Qt) ? Qnil : require_match); 1593 EQ (require_match, Qt) ? Qnil : require_match);
1591 last_exact_completion = Qnil; 1594 last_exact_completion = Qnil;
1592 1595
1596 position = Qnil;
1597 if (!NILP (init))
1598 {
1599 if (CONSP (init))
1600 {
1601 position = Fcdr (init);
1602 init = Fcar (init);
1603 }
1604 CHECK_STRING (init);
1605 if (!NILP (position))
1606 {
1607 CHECK_NUMBER (position);
1608 /* Convert to distance from end of input. */
1609 pos = XINT (position) - SCHARS (init);
1610 }
1611 }
1612
1593 if (SYMBOLP (hist)) 1613 if (SYMBOLP (hist))
1594 { 1614 {
1595 histvar = hist; 1615 histvar = hist;
1596 histpos = Qnil; 1616 histpos = Qnil;
1597 } 1617 }
1606 XSETFASTINT (histpos, 0); 1626 XSETFASTINT (histpos, 0);
1607 1627
1608 val = read_minibuf (NILP (require_match) 1628 val = read_minibuf (NILP (require_match)
1609 ? Vminibuffer_local_completion_map 1629 ? Vminibuffer_local_completion_map
1610 : Vminibuffer_local_must_match_map, 1630 : Vminibuffer_local_must_match_map,
1611 initial_input, prompt, Qnil, 0, 1631 init, prompt, make_number (pos), 0,
1612 histvar, histpos, def, 0, 1632 histvar, histpos, def, 0,
1613 !NILP (inherit_input_method)); 1633 !NILP (inherit_input_method));
1614 1634
1615 if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (def)) 1635 if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (def))
1616 val = def; 1636 val = def;