/* Width of current mini-buffer prompt. Only set after display_line
of the line that contains the prompt. */
-static EMACS_INT minibuf_prompt_width;
+static ptrdiff_t minibuf_prompt_width;
\f
/* Put minibuf on currently selected frame's minibuffer.
static Lisp_Object read_minibuf_unwind (Lisp_Object);
static Lisp_Object run_exit_minibuf_hook (Lisp_Object);
static Lisp_Object read_minibuf (Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object,
+ Lisp_Object,
int, Lisp_Object,
Lisp_Object, Lisp_Object,
int, int);
{
struct gcpro gcpro1, gcpro2;
Lisp_Object expr_and_pos;
- EMACS_INT pos;
+ ptrdiff_t pos;
GCPRO2 (val, defalt);
{
/* Ignore trailing whitespace; any other trailing junk
is an error. */
- EMACS_INT i;
+ ptrdiff_t i;
pos = string_char_to_byte (val, pos);
for (i = pos; i < SBYTES (val); i++)
{
If the current buffer is not a minibuffer, return its entire contents. */)
(void)
{
- EMACS_INT prompt_end = XINT (Fminibuffer_prompt_end ());
+ ptrdiff_t prompt_end = XINT (Fminibuffer_prompt_end ());
return make_buffer_string (prompt_end, ZV, 1);
}
If the current buffer is not a minibuffer, return its entire contents. */)
(void)
{
- EMACS_INT prompt_end = XINT (Fminibuffer_prompt_end ());
+ ptrdiff_t prompt_end = XINT (Fminibuffer_prompt_end ());
return make_buffer_string (prompt_end, ZV, 0);
}
If the current buffer is not a minibuffer, return its entire contents. */)
(void)
{
- EMACS_INT prompt_end = XINT (Fminibuffer_prompt_end ());
+ ptrdiff_t 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);
static Lisp_Object
read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
- Lisp_Object backup_n, int expflag,
+ int expflag,
Lisp_Object histvar, Lisp_Object histpos, Lisp_Object defalt,
int allow_props, int inherit_input_method)
{
Lisp_Object val;
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
Lisp_Object mini_frame, ambient_dir, minibuffer, input_method;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
Lisp_Object enable_multibyte;
- int pos = INTEGERP (backup_n) ? XINT (backup_n) : 0;
+ EMACS_INT pos = 0;
/* String to add to the history. */
Lisp_Object histstring;
{
if (CONSP (initial))
{
- backup_n = Fcdr (initial);
+ Lisp_Object backup_n = Fcdr (initial);
initial = Fcar (initial);
CHECK_STRING (initial);
if (!NILP (backup_n))
/* Erase the buffer. */
{
- int count1 = SPECPDL_INDEX ();
+ ptrdiff_t count1 = SPECPDL_INDEX ();
specbind (Qinhibit_read_only, Qt);
specbind (Qinhibit_modification_hooks, Qt);
Ferase_buffer ();
}
else
{
- int count = SPECPDL_INDEX ();
+ ptrdiff_t 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
/* Erase the minibuffer we were using at this level. */
{
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
/* Prevent error in erase-buffer. */
specbind (Qinhibit_read_only, Qt);
specbind (Qinhibit_modification_hooks, Qt);
GCPRO1 (default_value);
val = read_minibuf (keymap, initial_contents, prompt,
- Qnil, !NILP (read),
+ !NILP (read),
histvar, histpos, default_value,
minibuffer_allow_text_properties,
!NILP (inherit_input_method));
{
CHECK_STRING (prompt);
return read_minibuf (Vminibuffer_local_map, initial_contents,
- prompt, Qnil, 1, Qminibuffer_history,
+ prompt, 1, Qminibuffer_history,
make_number (0), Qnil, 0, 0);
}
(Lisp_Object prompt, Lisp_Object initial_contents)
{
return Feval (read_minibuf (Vread_expression_map, initial_contents,
- prompt, Qnil, 1, Qread_expression_history,
+ prompt, 1, Qread_expression_history,
make_number (0), Qnil, 0, 0),
Qnil);
}
(Lisp_Object prompt, Lisp_Object initial, Lisp_Object inherit_input_method)
{
CHECK_STRING (prompt);
- return read_minibuf (Vminibuffer_local_ns_map, initial, prompt, Qnil,
+ return read_minibuf (Vminibuffer_local_ns_map, initial, prompt,
0, Qminibuffer_history, make_number (0), Qnil, 0,
!NILP (inherit_input_method));
}
Lisp_Object args[4], result;
char *s;
ptrdiff_t len;
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
if (BUFFERP (def))
def = BVAR (XBUFFER (def), name);
{
Lisp_Object bestmatch, tail, elt, eltstring;
/* Size in bytes of BESTMATCH. */
- int bestmatchsize = 0;
+ ptrdiff_t bestmatchsize = 0;
/* These are in bytes, too. */
- int compare, matchsize;
+ ptrdiff_t compare, matchsize;
enum { function_table, list_table, obarray_table, hash_table}
type = (HASH_TABLE_P (collection) ? hash_table
: VECTORP (collection) ? obarray_table
&& (!SYMBOLP (XCAR (collection))
|| NILP (XCAR (collection)))))
? list_table : function_table));
- EMACS_INT idx = 0, obsize = 0;
+ ptrdiff_t idx = 0, obsize = 0;
int matchcount = 0;
- int bindcount = -1;
+ ptrdiff_t bindcount = -1;
Lisp_Object bucket, zero, end, tem;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
: NILP (collection) || (CONSP (collection)
&& (!SYMBOLP (XCAR (collection))
|| NILP (XCAR (collection))));
- EMACS_INT idx = 0, obsize = 0;
- int bindcount = -1;
+ ptrdiff_t idx = 0, obsize = 0;
+ ptrdiff_t bindcount = -1;
Lisp_Object bucket, tem, zero;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
/* Reject this element if it fails to match all the regexps. */
if (CONSP (Vcompletion_regexp_list))
{
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil);
for (regexps = Vcompletion_regexp_list; CONSP (regexps);
regexps = XCDR (regexps))