(make_lispy_position): Add x and y coordinates
[bpt/emacs.git] / src / minibuf.c
index b0b3cda..542fdd5 100644 (file)
@@ -1,6 +1,6 @@
 /* Minibuffer input and completion.
-   Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1985,86,93,94,95,96,97,98,99,2000,01,03
+             Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -485,6 +485,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
       val = read_minibuf_noninteractive (map, initial, prompt, backup_n,
                                         expflag, histvar, histpos, defalt,
                                         allow_props, inherit_input_method);
+      UNGCPRO;
       return unbind_to (count, val);
     }
 
@@ -738,7 +739,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
 
   /* The appropriate frame will get selected
      in set-window-configuration.  */
-  RETURN_UNGCPRO (unbind_to (count, val));
+  UNGCPRO;
+  return unbind_to (count, val);
 }
 
 /* Return a buffer to be used as the minibuffer at depth `depth'.
@@ -775,7 +777,11 @@ get_minibuffer (depth)
   else
     {
       int count = SPECPDL_INDEX ();
-
+      /* `reset_buffer' blindly sets the list of overlays to NULL, so we
+        have to empty the list, otherwise we end up with overlays that
+        think they belong to this buffer while the buffer doesn't know about
+        them any more.  */
+      delete_all_overlays (XBUFFER (buf));
       reset_buffer (XBUFFER (buf));
       record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
       Fset_buffer (buf);
@@ -1125,7 +1131,8 @@ minibuf_conform_representation (string, basis)
 
 DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0,
        doc: /* Return common substring of all completions of STRING in ALIST.
-Each car of each element of ALIST is tested to see if it begins with STRING.
+Each car of each element of ALIST (or each element if it is not a cons cell)
+is tested to see if it begins with STRING.
 All that match are compared together; the longest initial sequence
 common to all matches is returned as a string.
 If there is no match at all, nil is returned.
@@ -1367,7 +1374,8 @@ is used to further constrain the set of candidates.  */)
 \f
 DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0,
        doc: /* Search for partial matches to STRING in ALIST.
-Each car of each element of ALIST is tested to see if it begins with STRING.
+Each car of each element of ALIST (or each element if it is not a cons cell)
+is tested to see if it begins with STRING.
 The value is a list of all the strings from ALIST that match.
 
 If ALIST is a hash-table, all the string keys are the possible matches.
@@ -2679,3 +2687,6 @@ keys_of_minibuf ()
   initial_define_key (Vminibuffer_local_must_match_map, Ctl ('j'),
                      "minibuffer-complete-and-exit");
 }
+
+/* arch-tag: 8f69b601-fba3-484c-a6dd-ceaee54a7a73
+   (do not change this comment) */