}
\f\f
+Lisp_Object Fdelete_overlay ();
+
DEFUN ("move-overlay", Fmove_overlay, Smove_overlay, 3, 4, 0,
"Set the endpoints of OVERLAY to BEG and END in BUFFER.\n\
If BUFFER is omitted, leave OVERLAY in the same buffer it inhabits now.\n\
/* Redisplay where the overlay was. */
if (!NILP (obuffer))
{
- Lisp_Object o_beg;
- Lisp_Object o_end;
+ int o_beg;
+ int o_end;
o_beg = OVERLAY_POSITION (OVERLAY_START (overlay));
o_end = OVERLAY_POSITION (OVERLAY_END (overlay));
- modify_overlay (ob, XINT (o_beg), XINT (o_end));
+ modify_overlay (ob, o_beg, o_end);
}
/* Redisplay where the overlay is going to be. */
else
/* Redisplay the area the overlay has just left, or just enclosed. */
{
- Lisp_Object o_beg;
- Lisp_Object o_end;
+ int o_beg, o_end;
int change_beg, change_end;
o_beg = OVERLAY_POSITION (OVERLAY_START (overlay));
o_end = OVERLAY_POSITION (OVERLAY_END (overlay));
- if (XINT (o_beg) == XINT (beg))
- modify_overlay (b, XINT (o_end), XINT (end));
- else if (XINT (o_end) == XINT (end))
- modify_overlay (b, XINT (o_beg), XINT (beg));
+ if (o_beg == XINT (beg))
+ modify_overlay (b, o_end, XINT (end));
+ else if (o_end == XINT (end))
+ modify_overlay (b, o_beg, XINT (beg));
else
{
- if (XINT (beg) < XINT (o_beg)) o_beg = beg;
- if (XINT (end) > XINT (o_end)) o_end = end;
- modify_overlay (b, XINT (o_beg), XINT (o_end));
+ if (XINT (beg) < o_beg) o_beg = XINT (beg);
+ if (XINT (end) > o_end) o_end = XINT (end);
+ modify_overlay (b, o_beg, o_end);
}
}
{
if (INTEGERP (obj))
{
- c = DOWNCASE (obj);
+ c = DOWNCASE (XFASTINT (obj));
if (inword)
XSETFASTINT (obj, c);
else if (c == XFASTINT (obj))
{
- c = UPCASE1 (obj);
+ c = UPCASE1 (XFASTINT (obj));
XSETFASTINT (obj, c);
}
return obj;
/* Used as a temporary in DOWNCASE and other macros in lisp.h. No
need to mark it, since it is used only very temporarily. */
-Lisp_Object case_temp1, case_temp2;
+int case_temp1;
+Lisp_Object case_temp2;
static void set_canon ();
static void set_identity ();
shuffle (table, c, elt)
Lisp_Object table, c, elt;
{
- if (NATNUMP (elt) && c != elt)
+ if (NATNUMP (elt) && !EQ (c, elt))
{
Lisp_Object tem = Faref (table, elt);
Faset (table, elt, c);
if (CONSP (elt)
&& CATEGORYP (XCONS (elt)->car)
&& CATEGORYP (XCONS (elt)->cdr)
- && CATEGORY_MEMBER (XCONS (elt)->car, category_set1)
- && CATEGORY_MEMBER (XCONS (elt)->cdr, category_set2))
+ && CATEGORY_MEMBER (XFASTINT (XCONS (elt)->car), category_set1)
+ && CATEGORY_MEMBER (XFASTINT (XCONS (elt)->cdr), category_set2))
return !default_result;
}
return default_result;
/* Return 1 if CATEGORY_SET contains CATEGORY, else return 0.
The faster version of `!NILP (Faref (category_set, category))'. */
#define CATEGORY_MEMBER(category, category_set) \
- (!NILP (category_set) \
- && (XCATEGORY_SET (category_set)->data[XFASTINT (category) / 8] \
- & (1 << (XFASTINT (category) % 8))))
+ (XCATEGORY_SET (category_set)->data[(category) / 8] \
+ & (1 << ((category) % 8)))
/* Temporary internal variable used in macro CHAR_HAS_CATEGORY. */
extern Lisp_Object _temp_category_set;
table = XCHAR_TABLE (table)->parent; \
else \
temp = Faref (table, \
- COMPOSITE_CHAR_P (c) ? cmpchar_component (c, 0) : (c)); \
+ make_number (COMPOSITE_CHAR_P (c) \
+ ? cmpchar_component (c, 0) : (c))); \
temp; })
#else
#define CATEGORY_SET(c) \
((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS \
? Faref (current_buffer->category_table, make_number ((unsigned char) c)) \
: Faref (current_buffer->category_table, \
- COMPOSITE_CHAR_P (c) ? cmpchar_component ((c), 0) : (c)))
+ make_number (COMPOSITE_CHAR_P (c) \
+ ? cmpchar_component ((c), 0) : (c))))
#endif
/* Return the doc string of CATEGORY in category table TABLE. */
case CCL_WriteArrayReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */
i = reg[rrr];
- j = ccl_prog[ic];
+ j = XINT (ccl_prog[ic]);
if ((unsigned int) i < j)
{
i = XINT (ccl_prog[ic + 1 + i]);
/* Set designation state into CODING. */
#define DECODE_DESIGNATION(reg, dimension, chars, final_char) \
do { \
- int charset = ISO_CHARSET_TABLE (dimension, chars, final_char); \
+ int charset = ISO_CHARSET_TABLE (make_number (dimension), \
+ make_number (chars), \
+ make_number (final_char)); \
if (charset >= 0) \
{ \
if (coding->direction == 1 \
|| (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
error ("Invalid %dth argument", XINT (target_idx) + 1);
- chain = (operation == Qinsert_file_contents || operation == Qwrite_region
+ chain = ((EQ (operation, Qinsert_file_contents)
+ || EQ (operation, Qwrite_region))
? Vfile_coding_system_alist
- : (operation == Qopen_network_stream
+ : (EQ (operation, Qopen_network_stream)
? Vnetwork_coding_system_alist
: Vprocess_coding_system_alist));
if (NILP (chain))
#ifdef emacs /* Don't do this for lib-src. */
/* Tell regex.c to use a type compatible with Emacs. */
#define RE_TRANSLATE_TYPE Lisp_Object *
+#define RE_TRANSLATE(TBL, C) XINT ((TBL)[C])
#endif
/* Avoid link-time collision with system mktime if we will use our own. */
char *tzstring;
char **oldenv = environ, **newenv;
- if (zone == Qt)
+ if (EQ (zone, Qt))
tzstring = "UTC0";
else if (STRINGP (zone))
tzstring = (char *) XSTRING (zone)->data;
if (NILP (tz))
tzstring = 0;
- else if (tz == Qt)
+ else if (EQ (tz, Qt))
tzstring = "UTC0";
else
{
}
\f
static Lisp_Object build_annotations ();
+extern Lisp_Object Ffile_locked_p ();
/* If build_annotations switched buffers, switch back to BUF.
Kill the temporary buffer that was selected in the meantime.
This variable affects the built-in functions only on Windows,\n\
on other platforms, it is initialized so that Lisp code can find out\n\
what the normal separator is.");
- Vdirectory_sep_char = '/';
+ XSETFASTINT (Vdirectory_sep_char, '/');
DEFVAR_LISP ("file-name-handler-alist", &Vfile_name_handler_alist,
"*Alist of elements (REGEXP . HANDLER) for file names handled specially.\n\
size = XVECTOR (string)->size;
if (NILP (to))
- to = size;
+ XSETINT (to, size);
else
CHECK_NUMBER (to, 2);
return 0;
}
\f
+extern Lisp_Object Fmake_char_internal ();
+
DEFUN ("fillarray", Ffillarray, Sfillarray, 2, 2, 0,
"Store each element of ARRAY with ITEM.\n\
ARRAY is a vector, string, char-table, or bool-vector.")
int to;
Lisp_Object window;
{
- Lisp_Object prop, position, end, overlay_limit, proplimit;
+ Lisp_Object prop, position, overlay_limit, proplimit;
Lisp_Object buffer;
+ int end;
XSETFASTINT (position, pos);
XSETBUFFER (buffer, current_buffer);
/* No matter what. don't go past next overlay change. */
if (XFASTINT (overlay_limit) < XFASTINT (proplimit))
proplimit = overlay_limit;
- end = Fnext_single_property_change (position, Qinvisible,
- buffer, proplimit);
+ end = XFASTINT (Fnext_single_property_change (position, Qinvisible,
+ buffer, proplimit));
/* Don't put the boundary in the middle of multibyte form if
there is no actual property change. */
if (end == pos + 100
&& end < ZV)
while (pos < end && !CHAR_HEAD_P (POS_ADDR (end)))
end--;
- *next_boundary_p = XFASTINT (end);
+ *next_boundary_p = end;
}
/* if the `invisible' property is set, we can skip to
the next property change */
XSTRING (parent)->intervals = new;
}
- new->parent = (INTERVAL) parent;
+ new->parent = (INTERVAL) XFASTINT (parent);
new->position = 1;
return new;
if (interval->parent == NULL_INTERVAL)
return interval;
- parent = (Lisp_Object) (interval->parent);
+ XSETFASTINT (parent, (EMACS_INT) interval->parent);
interval = balance_an_interval (interval);
if (BUFFERP (parent))
if (ROOT_INTERVAL_P (i))
{
Lisp_Object owner;
- owner = (Lisp_Object) i->parent;
+ XSETFASTINT (owner, (EMACS_INT) i->parent);
parent = delete_node (i);
if (! NULL_INTERVAL_P (parent))
- parent->parent = (INTERVAL) owner;
+ parent->parent = (INTERVAL) XFASTINT (owner);
if (BUFFERP (owner))
BUF_INTERVALS (XBUFFER (owner)) = parent;
if (! NILP (Vinhibit_point_motion_hooks))
/* If intangible is inhibited, always move point to POSITION. */
;
- else if (PT < position && pos < ZV)
+ else if (PT < position && XINT (pos) < ZV)
{
/* We want to move forward, so check the text before POSITION. */
intangible_propval))
pos = Fprevious_char_property_change (pos, Qnil);
}
- else if (pos > BEGV)
+ else if (XINT (pos) > BEGV)
{
/* We want to move backward, so check the text after POSITION. */
if (NULL_INTERVAL_P (interval_copy))
return;
- interval_copy->parent = (INTERVAL) string;
+ interval_copy->parent = (INTERVAL) XFASTINT (string);
XSTRING (string)->intervals = interval_copy;
}
\f
/* True if an interval pointer is null, or is a Lisp_Buffer or
Lisp_String pointer (meaning it points to the owner of this
interval tree). */
+#ifdef NO_UNION_TYPE
#define NULL_INTERVAL_P(i) ((i) == NULL_INTERVAL \
|| BUFFERP ((Lisp_Object)(i)) \
|| STRINGP ((Lisp_Object)(i)))
+#else
+#define NULL_INTERVAL_P(i) ((i) == NULL_INTERVAL \
+ || BUFFERP ((Lisp_Object){(EMACS_INT)(i)}) \
+ || STRINGP ((Lisp_Object){(EMACS_INT)(i)}))
+#endif
/* True if this interval has no right child. */
#define NULL_RIGHT_CHILD(i) ((i)->right == NULL_INTERVAL)
key = Fcdr (object);
if (INTEGERP (key) && (XINT (key) & meta_modifier))
{
- object = access_keymap (map, make_number (meta_prefix_char),
- 0, 0);
+ object = access_keymap (map, meta_prefix_char, 0, 0);
map = get_keymap_1 (object, 0, autoload);
object = access_keymap (map,
make_number (XINT (key) & ~meta_modifier),
element = thisseq;
tem = Fvconcat (1, &element);
- XVECTOR (tem)->contents[XINT (last)]
- = XINT (elt) | meta_modifier;
+ XSETFASTINT (XVECTOR (tem)->contents[XINT (last)],
+ XINT (elt) | meta_modifier);
/* This new sequence is the same length as
thisseq, so stick it in the list right
int starting_i;
if (indices == 0)
- indices = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object));
+ indices = (int *) alloca (3 * sizeof (int));
definition = Qnil;
and 8-bit Europeans characters. For these characters, do not check
validity of CT. Do not follow parent. */
#define CHAR_TABLE_REF(CT, IDX) \
- (XFASTINT (IDX) < CHAR_TABLE_SINGLE_BYTE_SLOTS \
- ? (!NILP (XCHAR_TABLE (CT)->contents[XFASTINT (IDX)])\
- ? XCHAR_TABLE (CT)->contents[XFASTINT (IDX)] \
+ ((IDX) < CHAR_TABLE_SINGLE_BYTE_SLOTS \
+ ? (!NILP (XCHAR_TABLE (CT)->contents[IDX]) \
+ ? XCHAR_TABLE (CT)->contents[IDX] \
: XCHAR_TABLE (CT)->defalt) \
- : Faref (CT, IDX))
+ : Faref (CT, make_number (IDX)))
/* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and
8-bit Europeans characters. Do not check validity of CT. */
#define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit))
\f
/* Variables used locally in the following case handling macros. */
-extern Lisp_Object case_temp1, case_temp2;
+extern int case_temp1;
+extern Lisp_Object case_temp2;
/* Current buffer's map from characters to lower-case characters. */
extern Lisp_Object Fsymbol_value (), find_symbol_value (), Fset ();
extern Lisp_Object Fdefault_value (), Fset_default (), Fdefault_boundp ();
extern Lisp_Object Fmake_local_variable ();
+extern Lisp_Object Flocal_variable_if_set_p ();
extern Lisp_Object Faref (), Faset ();
/* Defined in coding.c */
extern Lisp_Object Fcoding_system_p (), Fcheck_coding_system ();
extern Lisp_Object Fread_coding_system (), Fread_non_nil_coding_system ();
+extern Lisp_Object Ffind_coding_system ();
/* Defined in syntax.c */
extern Lisp_Object Fforward_word ();
extern Lisp_Object Fcopy_alist ();
extern Lisp_Object Fplist_get ();
extern Lisp_Object Fset_char_table_parent ();
+extern Lisp_Object Fchar_table_extra_slot ();
+extern Lisp_Object Frassoc ();
/* Defined in insdel.c */
extern void move_gap ();
extern Lisp_Object save_excursion_restore (), save_restriction_restore ();
extern Lisp_Object Fchar_to_string ();
extern Lisp_Object Fdelete_region (), Fnarrow_to_region (), Fwiden ();
+extern Lisp_Object Fuser_login_name (), Fsystem_name ();
/* defined in buffer.c */
extern Lisp_Object Foverlay_start (), Foverlay_end ();
extern Lisp_Object Qoverlayp;
extern Lisp_Object get_truename_buffer ();
extern struct buffer *all_buffers;
+extern Lisp_Object Fprevious_overlay_change ();
/* defined in marker.c */
extern Lisp_Object Funhandled_file_name_directory ();
extern Lisp_Object Ffile_directory_p ();
extern Lisp_Object Fwrite_region ();
+extern Lisp_Object Ffile_readable_p (), Ffile_executable_p ();
/* Defined in abbrev.c */
/* defined in indent.c */
extern Lisp_Object Fvertical_motion (), Findent_to (), Fcurrent_column ();
+extern Lisp_Object Fmove_to_column ();
/* defined in window.c */
extern Lisp_Object Qwindowp, Qwindow_live_p;
extern Lisp_Object Fset_frame_position ();
extern Lisp_Object Fraise_frame ();
extern Lisp_Object Fredirect_frame_focus ();
+extern Lisp_Object frame_buffer_list ();
/* defined in emacs.c */
extern Lisp_Object decode_env_path ();
extern Lisp_Object Fget_text_property (), Fput_text_property ();
extern Lisp_Object Fset_text_properties ();
extern Lisp_Object Ftext_property_not_all ();
+extern Lisp_Object Fprevious_char_property_change ();
+extern Lisp_Object Fnext_char_property_change ();
/* defined in intervals.c */
extern Lisp_Object get_local_map ();
if (completion_ignore_case)
{
- while (l && EQ (DOWNCASE (*s1++), DOWNCASE (*s2++)))
+ while (l && DOWNCASE (*s1++) == DOWNCASE (*s2++))
l--;
}
else
else
{
if (CONSP (printed_gensyms))
- XSETFASTINT (tem, XCDR (XCAR (printed_gensyms)) + 1);
+ XSETFASTINT (tem, XFASTINT (XCDR (XCAR (printed_gensyms))) + 1);
else
XSETFASTINT (tem, 1);
printed_gensyms = Fcons (Fcons (obj, tem), printed_gensyms);
gl_state.current_syntax_table = tmp_table;
gl_state.old_prop = tmp_table;
- if (Fsyntax_table_p (tmp_table) == Qt)
+ if (EQ (Fsyntax_table_p (tmp_table), Qt))
{
gl_state.use_global = 0;
}
char_int = XINT (character);
code = SYNTAX (char_int);
if (code == Sopen || code == Sclose)
- return make_number (SYNTAX_MATCH (char_int));
+ return SYNTAX_MATCH (char_int);
return Qnil;
}
p = XSTRING (newentry)->data;
code = (enum syntaxcode) syntax_spec_code[*p++];
if (((int) code & 0377) == 0377)
- error ("invalid syntax description letter: %c", XINT (c));
+ error ("invalid syntax description letter: %c", p[-1]);
if (code == Sinherit)
{
({ Lisp_Object temp; \
temp = SYNTAX_ENTRY (c); \
(CONSP (temp) \
- ? XINT (XCONS (temp)->cdr) \
+ ? XCONS (temp)->cdr \
: Qnil); })
#else
#define SYNTAX(c) \
#define SYNTAX_MATCH(c) \
(syntax_temp = SYNTAX_ENTRY ((c)), \
(CONSP (syntax_temp) \
- ? XINT (XCONS (syntax_temp)->cdr) \
+ ? XCONS (syntax_temp)->cdr \
: Qnil))
#endif
tty = old_tty;
#if defined (HAVE_TERMIO) || defined (HAVE_TERMIOS)
- Vtty_erase_char = old_tty.main.c_cc[VERASE];
+ XSETINT (Vtty_erase_char, old_tty.main.c_cc[VERASE]);
#ifdef DGUX
/* This allows meta to be sent on 8th bit. */
Lisp_Object start, end;
{
if (! NILP (interval_insert_behind_hooks))
- call_mod_hooks (interval_insert_behind_hooks,
- make_number (start), make_number (end));
+ call_mod_hooks (interval_insert_behind_hooks, start, end);
if (! NILP (interval_insert_in_front_hooks)
&& ! EQ (interval_insert_in_front_hooks,
interval_insert_behind_hooks))
- call_mod_hooks (interval_insert_in_front_hooks,
- make_number (start), make_number (end));
+ call_mod_hooks (interval_insert_in_front_hooks, start, end);
}
\f
void