+2010-09-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * lisp.h: Have oblookup take EMACS_INT to allow interning big
+ string and avoid compiler warnings.
+ (USE_SAFE_ALLOCA): Cast to int to avoid compilation warnings in
+ all users.
+
+ * lread.c (oblookup): EMACS_INT/int cleanup.
+
+ * cmds.c (Fforward_line, Fdelete_char): EMACS_INT/int cleanup.
+
2010-09-23 Eli Zaretskii <eliz@gnu.org>
* editfns.c (clip_to_bounds): Return an EMACS_INT value.
hooks, etcetera), that's not a good approach. So we validate the
proposed position, then set point. */
{
- int new_point = PT + XINT (n);
+ EMACS_INT new_point = PT + XINT (n);
if (new_point < BEGV)
{
successfully moved (for the return value). */)
(Lisp_Object n)
{
- int opoint = PT, opoint_byte = PT_BYTE;
- int pos, pos_byte;
- int count, shortage;
+ EMACS_INT opoint = PT, opoint_byte = PT_BYTE;
+ EMACS_INT pos, pos_byte;
+ EMACS_INT count, shortage;
if (NILP (n))
count = 1;
to t. */)
(Lisp_Object n)
{
- int newpos;
+ EMACS_INT newpos;
if (NILP (n))
XSETFASTINT (n, 1);
The command `delete-forward' is preferable for interactive use. */)
(Lisp_Object n, Lisp_Object killflag)
{
- int pos;
+ EMACS_INT pos;
CHECK_NUMBER (n);
bitch_at_user ();
{
int character = translate_char (Vtranslation_table_for_input,
- XINT (last_command_event));
- int val = internal_self_insert (character, XFASTINT (n));
+ (int) XINT (last_command_event));
+ int val = internal_self_insert (character, (int) XFASTINT (n));
if (val == 2)
nonundocount = 0;
frame_make_pointer_invisible ();
int len;
/* Working buffer and pointer for multi-byte form of C. */
unsigned char str[MAX_MULTIBYTE_LENGTH];
- int chars_to_delete = 0;
- int spaces_to_insert = 0;
+ EMACS_INT chars_to_delete = 0;
+ EMACS_INT spaces_to_insert = 0;
overwrite = current_buffer->overwrite_mode;
if (!NILP (Vbefore_change_functions) || !NILP (Vafter_change_functions))
chars_to_delete = n;
else if (c != '\n' && c2 != '\n')
{
- int pos = PT;
- int pos_byte = PT_BYTE;
+ EMACS_INT pos = PT;
+ EMACS_INT pos_byte = PT_BYTE;
/* Column the cursor should be placed at after this insertion.
The correct value should be calculated only when necessary. */
int target_clm = ((int) current_column () /* iftc */
- + n * XINT (Fchar_width (make_number (c))));
+ + n * (int) XINT (Fchar_width (make_number (c))));
/* The actual cursor position after the trial of moving
to column TARGET_CLM. It is greater than TARGET_CLM
character. In that case, the new point is set after
that character. */
int actual_clm
- = XFASTINT (Fmove_to_column (make_number (target_clm), Qnil));
+ = (int) XFASTINT (Fmove_to_column (make_number (target_clm),
+ Qnil));
chars_to_delete = PT - pos;
extern Lisp_Object intern (const char *);
extern Lisp_Object intern_c_string (const char *);
extern Lisp_Object make_symbol (const char *);
-extern Lisp_Object oblookup (Lisp_Object, const char *, int, int);
+extern Lisp_Object oblookup (Lisp_Object, const char *, EMACS_INT, EMACS_INT);
#define LOADHIST_ATTACH(x) \
do { \
if (initialized) Vcurrent_load_list = Fcons (x, Vcurrent_load_list); \
extern Lisp_Object safe_alloca_unwind (Lisp_Object);
#define USE_SAFE_ALLOCA \
- int sa_count = SPECPDL_INDEX (), sa_must_free = 0
+ int sa_count = (int) SPECPDL_INDEX (), sa_must_free = 0
/* SAFE_ALLOCA allocates a simple buffer. */