Merge from trunk
[bpt/emacs.git] / src / minibuf.c
index 5dc7b0b..0f3def6 100644 (file)
@@ -36,8 +36,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "keymap.h"
 #include "termhooks.h"
 
-extern int quit_char;
-
 /* List of buffers for use as minibuffers.
    The first element of the list is used for the outermost minibuffer
    invocation, the next element is used for a recursive minibuffer
@@ -143,11 +141,6 @@ Lisp_Object Qcase_fold_search;
 
 Lisp_Object Qread_expression_history;
 
-extern Lisp_Object Voverriding_local_map;
-
-extern Lisp_Object Qmouse_face;
-
-extern Lisp_Object Qfield;
 \f
 /* Put minibuf on currently selected frame's minibuffer.
    We do this whenever the user starts a new minibuffer
@@ -241,7 +234,7 @@ string_to_object (Lisp_Object val, Lisp_Object defalt)
 {
   struct gcpro gcpro1, gcpro2;
   Lisp_Object expr_and_pos;
-  int pos;
+  EMACS_INT pos;
 
   GCPRO2 (val, defalt);
 
@@ -259,7 +252,7 @@ string_to_object (Lisp_Object val, Lisp_Object defalt)
     {
       /* Ignore trailing whitespace; any other trailing junk
         is an error.  */
-      int i;
+      EMACS_INT i;
       pos = string_char_to_byte (val, pos);
       for (i = pos; i < SBYTES (val); i++)
        {
@@ -375,7 +368,7 @@ DEFUN ("minibuffer-contents", Fminibuffer_contents,
 If the current buffer is not a minibuffer, return its entire contents.  */)
   (void)
 {
-  int prompt_end = XINT (Fminibuffer_prompt_end ());
+  EMACS_INT prompt_end = XINT (Fminibuffer_prompt_end ());
   return make_buffer_string (prompt_end, ZV, 1);
 }
 
@@ -385,7 +378,7 @@ DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties,
 If the current buffer is not a minibuffer, return its entire contents.  */)
   (void)
 {
-  int prompt_end = XINT (Fminibuffer_prompt_end ());
+  EMACS_INT prompt_end = XINT (Fminibuffer_prompt_end ());
   return make_buffer_string (prompt_end, ZV, 0);
 }
 
@@ -396,7 +389,7 @@ That is what completion commands operate on.
 If the current buffer is not a minibuffer, return its entire contents.  */)
   (void)
 {
-  int prompt_end = XINT (Fminibuffer_prompt_end ());
+  EMACS_INT prompt_end = XINT (Fminibuffer_prompt_end ());
   if (PT < prompt_end)
     error ("Cannot do completion in the prompt");
   return make_buffer_string (prompt_end, PT, 1);
@@ -444,9 +437,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
   Lisp_Object empty_minibuf;
   Lisp_Object dummy, frame;
 
-  extern Lisp_Object Qfront_sticky;
-  extern Lisp_Object Qrear_nonsticky;
-
   specbind (Qminibuffer_default, defalt);
 
   /* If Vminibuffer_completing_file_name is `lambda' on entry, it was t
@@ -824,7 +814,6 @@ get_minibuffer (int depth)
 {
   Lisp_Object tail, num, buf;
   char name[24];
-  extern Lisp_Object nconc2 (Lisp_Object, Lisp_Object);
 
   XSETFASTINT (num, depth);
   tail = Fnthcdr (num, Vminibuffer_list);
@@ -1152,7 +1141,7 @@ Optional second arg DEF is value to return if user enters an empty line.
  If DEF is a list of default values, return its first element.
 Optional third arg REQUIRE-MATCH determines whether non-existing
  buffer names are allowed.  It has the same meaning as the
- REQUIRE-MATCH argument of `confirm-after-completion'.
+ REQUIRE-MATCH argument of `completing-read'.
 The argument PROMPT should be a string ending with a colon and a space.
 If `read-buffer-completion-ignore-case' is non-nil, completion ignores
 case while reading the buffer name.
@@ -2089,7 +2078,8 @@ syms_of_minibuf (void)
   staticpro (&Qread_expression_history);
 
   DEFVAR_LISP ("read-buffer-function", &Vread_buffer_function,
-              doc: /* If this is non-nil, `read-buffer' does its work by calling this function.  */);
+              doc: /* If this is non-nil, `read-buffer' does its work by calling this function.
+The function is called with the arguments passed to `read-buffer'.  */);
   Vread_buffer_function = Qnil;
 
   DEFVAR_BOOL ("read-buffer-completion-ignore-case",
@@ -2250,5 +2240,3 @@ properties.  */);
   defsubr (&Scompleting_read);
 }
 
-/* arch-tag: 8f69b601-fba3-484c-a6dd-ceaee54a7a73
-   (do not change this comment) */