aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuc Teirlinck2003-12-25 17:31:23 +0000
committerLuc Teirlinck2003-12-25 17:31:23 +0000
commit86408abdf4871166dadc6694cfa309244a4c46fb (patch)
tree546ed391c3ad4e77ec86a5aec014896193232248 /src
parentb91485007d4c4fd637291364eecd363e1cecfa9d (diff)
downloademacs-86408abdf4871166dadc6694cfa309244a4c46fb.tar.gz
emacs-86408abdf4871166dadc6694cfa309244a4c46fb.zip
(Fcompleting_read): Undo previous change.
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 4c98f7ba708..baeb0cef7b5 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1578,10 +1578,13 @@ Completion ignores case if the ambient value of
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);
@@ -1590,6 +1593,23 @@ Completion ignores case if the ambient value of
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;
@@ -1608,7 +1628,7 @@ Completion ignores case if the ambient value of
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