/* Minibuffer input and completion.
Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005,
/* Minibuffer input and completion.
Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005,
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
expr_and_pos = Fread_from_string (val, Qnil, Qnil);
pos = XINT (Fcdr (expr_and_pos));
expr_and_pos = Fread_from_string (val, Qnil, Qnil);
pos = XINT (Fcdr (expr_and_pos));
if (EQ (Vminibuffer_completing_file_name, Qlambda))
Vminibuffer_completing_file_name = Qnil;
if (EQ (Vminibuffer_completing_file_name, Qlambda))
Vminibuffer_completing_file_name = Qnil;
/* We have to do this after saving the window configuration
since that is what restores the current buffer. */
/* We have to do this after saving the window configuration
since that is what restores the current buffer. */
XWINDOW (minibuf_window)->cursor.x = 0;
XWINDOW (minibuf_window)->must_be_updated_p = 1;
update_frame (XFRAME (selected_frame), 1, 1);
XWINDOW (minibuf_window)->cursor.x = 0;
XWINDOW (minibuf_window)->must_be_updated_p = 1;
update_frame (XFRAME (selected_frame), 1, 1);
- if (rif && rif->flush_display)
- rif->flush_display (XFRAME (XWINDOW (minibuf_window)->frame));
+ {
+ struct frame *f = XFRAME (XWINDOW (minibuf_window)->frame);
+ struct redisplay_interface *rif = FRAME_RIF (f);
+ if (rif && rif->flush_display)
+ rif->flush_display (f);
+ }
doc: /* Return a Lisp object read using the minibuffer, unevaluated.
Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
is a string to insert in the minibuffer before reading.
doc: /* Return a Lisp object read using the minibuffer, unevaluated.
Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
is a string to insert in the minibuffer before reading.
-\(INITIAL-CONTENTS can also be a cons of a string and an integer. Such
-arguments are used as in `read-from-minibuffer'.) */)
+\(INITIAL-CONTENTS can also be a cons of a string and an integer.
+Such arguments are used as in `read-from-minibuffer'.) */)
(prompt, initial_contents)
Lisp_Object prompt, initial_contents;
{
(prompt, initial_contents)
Lisp_Object prompt, initial_contents;
{
doc: /* Return value of Lisp expression read using the minibuffer.
Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
is a string to insert in the minibuffer before reading.
doc: /* Return value of Lisp expression read using the minibuffer.
Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
is a string to insert in the minibuffer before reading.
-\(INITIAL-CONTENTS can also be a cons of a string and an integer. Such
-arguments are used as in `read-from-minibuffer'.) */)
+\(INITIAL-CONTENTS can also be a cons of a string and an integer.
+Such arguments are used as in `read-from-minibuffer'.) */)
(prompt, initial_contents)
Lisp_Object prompt, initial_contents;
{
(prompt, initial_contents)
Lisp_Object prompt, initial_contents;
{
Qnil, history, default_value,
inherit_input_method);
if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (default_value))
Qnil, history, default_value,
inherit_input_method);
if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (default_value))
- int type = (HASH_TABLE_P (collection) ? 3
- : VECTORP (collection) ? 2
- : NILP (collection) || (CONSP (collection)
- && (!SYMBOLP (XCAR (collection))
- || NILP (XCAR (collection)))));
+ enum { function_table, list_table, obarray_table, hash_table}
+ type = (HASH_TABLE_P (collection) ? hash_table
+ : VECTORP (collection) ? obarray_table
+ : ((NILP (collection)
+ || (CONSP (collection)
+ && (!SYMBOLP (XCAR (collection))
+ || NILP (XCAR (collection)))))
+ ? list_table : function_table));
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
CHECK_STRING (string);
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
CHECK_STRING (string);
return call3 (collection, string, predicate, Qnil);
bestmatch = bucket = Qnil;
return call3 (collection, string, predicate, Qnil);
bestmatch = bucket = Qnil;
{
while (index < HASH_TABLE_SIZE (XHASH_TABLE (collection))
&& NILP (HASH_HASH (XHASH_TABLE (collection), index)))
{
while (index < HASH_TABLE_SIZE (XHASH_TABLE (collection))
&& NILP (HASH_HASH (XHASH_TABLE (collection), index)))
GCPRO4 (tail, string, eltstring, bestmatch);
GCPRO4 (tail, string, eltstring, bestmatch);
- tem = type == 3
- ? call2 (predicate, elt,
- HASH_VALUE (XHASH_TABLE (collection), index - 1))
- : call1 (predicate, elt);
+ tem = (type == hash_table
+ ? call2 (predicate, elt,
+ HASH_VALUE (XHASH_TABLE (collection),
+ index - 1))
+ : call1 (predicate, elt));
Qread_file_name_internal = intern ("read-file-name-internal");
staticpro (&Qread_file_name_internal);
Qread_file_name_internal = intern ("read-file-name-internal");
staticpro (&Qread_file_name_internal);