mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 00:31:01 -08:00
more XCAR/XCDR/XFLOAT_DATA uses, to help isolete lisp engine
This commit is contained in:
parent
3a7093d84f
commit
7539e11fca
12 changed files with 414 additions and 370 deletions
|
|
@ -1,5 +1,45 @@
|
|||
1999-10-24 Ken Raeburn <raeburn@raeburn.org>
|
||||
|
||||
* alloc.c: Undef HIDE_LISP_IMPLEMENTATION before including
|
||||
lisp.h.
|
||||
|
||||
* buffer.c (Fbuffer_list, Fget_file_buffer, get_truename_buffer,
|
||||
Fbuffer_local_variables, Fother_buffer, record_buffer,
|
||||
set_buffer_internal_1, Fbury_buffer, Fkill_all_local_variables,
|
||||
swap_out_buffer_local_variables, overlays_at, overlays_in,
|
||||
overlay_touches_p, overlay_strings, recenter_overlay_lists,
|
||||
fix_overlays_in_range, fix_overlays_before, Foverlay_get,
|
||||
Foverlay_put, report_overlay_modification, evaporate_overlays):
|
||||
Use XCAR, XCDR, and XFLOAT_DATA instead of explicit member
|
||||
references.
|
||||
* data.c (Fcar, Fcar_safe, Fcdr, Fcdr_safe, Fsetcar, Fsetcdr,
|
||||
swap_in_symval_forwarding, set_internal, default_value,
|
||||
Fset_default, Fmake_variable_buffer_local, Fmake_local_variable,
|
||||
Fmake_variable_frame_local, Flocal_variable_p,
|
||||
Flocal_variable_if_set_p, arithcompare, Fzerop, cons_to_long,
|
||||
Fnumber_to_string, float_arith_driver, Fadd1, Fsub1): Likewise.
|
||||
* dispnew.c (Fframe_or_buffer_changed_p): Likewise.
|
||||
* emacs.c (main): Likewise.
|
||||
* fontset.c (fs_load_font, fs_register_fontset,
|
||||
CACHED_FONTSET_NAME, CACHED_FONTSET_REGEX, Fquery_fontset,
|
||||
Fnew_fontset, Fset_fontset_font): Likewise.
|
||||
* frame.c (do_switch_frame, next_frame, prev_frame,
|
||||
other_visible_frames, Fdelete_frame, Fvisible_frame_list):
|
||||
Likewise.
|
||||
* keyboard.c (read_char, help_char_p, event_to_kboard,
|
||||
kbd_buffer_get_event, timer_start_idle, timer_check,
|
||||
make_lispy_event, apply_modifiers, reorder_modifiers,
|
||||
Fevent_convert_list, lucid_event_type_list_p, menu_bar_items,
|
||||
menu_bar_one_keymap, menu_item_eval_property_1, parse_menu_item,
|
||||
tool_bar_items, read_char_x_menu_prompt, read_key_sequence,
|
||||
Fcommand_execute, Fexecute_extended_command): Likewise.
|
||||
* minibuf.c (read_minibuf, get_minibuffer, Ftry_completion,
|
||||
Fall_completions): Likewise.
|
||||
* window.c (Fset_window_margins): Likewise.
|
||||
|
||||
* callint.c (quotify_args): Don't explicitly use struct
|
||||
Lisp_Cons, use Lisp_Object and XCAR/XCDR instead.
|
||||
|
||||
* s/netbsd.h (HAVE_GETLOADAVG): Define as 1.
|
||||
(UNEXEC, START_FILES, LIB_STANDARD, LIB_GCC): Define ELF versions,
|
||||
if __ELF__ is defined.
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA. */
|
|||
/* Note that this declares bzero on OSF/1. How dumb. */
|
||||
#include <signal.h>
|
||||
|
||||
/* This file is part of the core Lisp implementation, and thus must
|
||||
deal with the real data structures. If the Lisp implementation is
|
||||
replaced, this file likely will not be used. */
|
||||
#undef HIDE_LISP_IMPLEMENTATION
|
||||
#include "lisp.h"
|
||||
#include "intervals.h"
|
||||
#include "puresize.h"
|
||||
|
|
|
|||
220
src/buffer.c
220
src/buffer.c
|
|
@ -214,8 +214,8 @@ If the optional arg FRAME is a frame, we return that frame's buffer list.")
|
|||
tail = framelist;
|
||||
while (! NILP (tail))
|
||||
{
|
||||
general = Fdelq (XCONS (tail)->car, general);
|
||||
tail = XCONS (tail)->cdr;
|
||||
general = Fdelq (XCAR (tail), general);
|
||||
tail = XCDR (tail);
|
||||
}
|
||||
return nconc2 (framelist, general);
|
||||
}
|
||||
|
|
@ -278,9 +278,9 @@ See also `find-buffer-visiting'.")
|
|||
if (!NILP (handler))
|
||||
return call2 (handler, Qget_file_buffer, filename);
|
||||
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
buf = Fcdr (XCONS (tail)->car);
|
||||
buf = Fcdr (XCAR (tail));
|
||||
if (!BUFFERP (buf)) continue;
|
||||
if (!STRINGP (XBUFFER (buf)->filename)) continue;
|
||||
tem = Fstring_equal (XBUFFER (buf)->filename, filename);
|
||||
|
|
@ -296,9 +296,9 @@ get_truename_buffer (filename)
|
|||
{
|
||||
register Lisp_Object tail, buf, tem;
|
||||
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
buf = Fcdr (XCONS (tail)->car);
|
||||
buf = Fcdr (XCAR (tail));
|
||||
if (!BUFFERP (buf)) continue;
|
||||
if (!STRINGP (XBUFFER (buf)->file_truename)) continue;
|
||||
tem = Fstring_equal (XBUFFER (buf)->file_truename, filename);
|
||||
|
|
@ -731,28 +731,28 @@ No argument or nil as argument means use current buffer as BUFFER.")
|
|||
|
||||
{
|
||||
register Lisp_Object tail;
|
||||
for (tail = buf->local_var_alist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object val, elt;
|
||||
|
||||
elt = XCONS (tail)->car;
|
||||
elt = XCAR (tail);
|
||||
|
||||
/* Reference each variable in the alist in buf.
|
||||
If inquiring about the current buffer, this gets the current values,
|
||||
so store them into the alist so the alist is up to date.
|
||||
If inquiring about some other buffer, this swaps out any values
|
||||
for that buffer, making the alist up to date automatically. */
|
||||
val = find_symbol_value (XCONS (elt)->car);
|
||||
val = find_symbol_value (XCAR (elt));
|
||||
/* Use the current buffer value only if buf is the current buffer. */
|
||||
if (buf != current_buffer)
|
||||
val = XCONS (elt)->cdr;
|
||||
val = XCDR (elt);
|
||||
|
||||
/* If symbol is unbound, put just the symbol in the list. */
|
||||
if (EQ (val, Qunbound))
|
||||
result = Fcons (XCONS (elt)->car, result);
|
||||
result = Fcons (XCAR (elt), result);
|
||||
/* Otherwise, put (symbol . value) in the list. */
|
||||
else
|
||||
result = Fcons (Fcons (XCONS (elt)->car, val), result);
|
||||
result = Fcons (Fcons (XCAR (elt), val), result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -928,9 +928,9 @@ If BUFFER is omitted or nil, some interesting buffer is returned.")
|
|||
add_ons = Qnil;
|
||||
while (CONSP (tem))
|
||||
{
|
||||
if (BUFFERP (XCONS (tem)->car))
|
||||
add_ons = Fcons (Fcons (Qnil, XCONS (tem)->car), add_ons);
|
||||
tem = XCONS (tem)->cdr;
|
||||
if (BUFFERP (XCAR (tem)))
|
||||
add_ons = Fcons (Fcons (Qnil, XCAR (tem)), add_ons);
|
||||
tem = XCDR (tem);
|
||||
}
|
||||
tail = nconc2 (Fnreverse (add_ons), tail);
|
||||
|
||||
|
|
@ -1237,9 +1237,9 @@ record_buffer (buf)
|
|||
frame = selected_frame;
|
||||
|
||||
prev = Qnil;
|
||||
for (link = Vbuffer_alist; CONSP (link); link = XCONS (link)->cdr)
|
||||
for (link = Vbuffer_alist; CONSP (link); link = XCDR (link))
|
||||
{
|
||||
if (EQ (XCONS (XCONS (link)->car)->cdr, buf))
|
||||
if (EQ (XCDR (XCAR (link)), buf))
|
||||
break;
|
||||
prev = link;
|
||||
}
|
||||
|
|
@ -1248,20 +1248,20 @@ record_buffer (buf)
|
|||
we cannot use Fdelq itself here because it allows quitting. */
|
||||
|
||||
if (NILP (prev))
|
||||
Vbuffer_alist = XCONS (Vbuffer_alist)->cdr;
|
||||
Vbuffer_alist = XCDR (Vbuffer_alist);
|
||||
else
|
||||
XCONS (prev)->cdr = XCONS (XCONS (prev)->cdr)->cdr;
|
||||
XCDR (prev) = XCDR (XCDR (prev));
|
||||
|
||||
XCONS (link)->cdr = Vbuffer_alist;
|
||||
XCDR (link) = Vbuffer_alist;
|
||||
Vbuffer_alist = link;
|
||||
|
||||
/* Now move this buffer to the front of frame_buffer_list also. */
|
||||
|
||||
prev = Qnil;
|
||||
for (link = frame_buffer_list (frame); CONSP (link);
|
||||
link = XCONS (link)->cdr)
|
||||
link = XCDR (link))
|
||||
{
|
||||
if (EQ (XCONS (link)->car, buf))
|
||||
if (EQ (XCAR (link), buf))
|
||||
break;
|
||||
prev = link;
|
||||
}
|
||||
|
|
@ -1272,11 +1272,11 @@ record_buffer (buf)
|
|||
{
|
||||
if (NILP (prev))
|
||||
set_frame_buffer_list (frame,
|
||||
XCONS (frame_buffer_list (frame))->cdr);
|
||||
XCDR (frame_buffer_list (frame)));
|
||||
else
|
||||
XCONS (prev)->cdr = XCONS (XCONS (prev)->cdr)->cdr;
|
||||
XCDR (prev) = XCDR (XCDR (prev));
|
||||
|
||||
XCONS (link)->cdr = frame_buffer_list (frame);
|
||||
XCDR (link) = frame_buffer_list (frame);
|
||||
set_frame_buffer_list (frame, link);
|
||||
}
|
||||
else
|
||||
|
|
@ -1516,31 +1516,31 @@ set_buffer_internal_1 (b)
|
|||
/* Look down buffer's list of local Lisp variables
|
||||
to find and update any that forward into C variables. */
|
||||
|
||||
for (tail = b->local_var_alist; !NILP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = b->local_var_alist; !NILP (tail); tail = XCDR (tail))
|
||||
{
|
||||
valcontents = XSYMBOL (XCONS (XCONS (tail)->car)->car)->value;
|
||||
valcontents = XSYMBOL (XCAR (XCAR (tail)))->value;
|
||||
if ((BUFFER_LOCAL_VALUEP (valcontents)
|
||||
|| SOME_BUFFER_LOCAL_VALUEP (valcontents))
|
||||
&& (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
|
||||
(BOOLFWDP (tem) || INTFWDP (tem) || OBJFWDP (tem))))
|
||||
/* Just reference the variable
|
||||
to cause it to become set for this buffer. */
|
||||
Fsymbol_value (XCONS (XCONS (tail)->car)->car);
|
||||
Fsymbol_value (XCAR (XCAR (tail)));
|
||||
}
|
||||
|
||||
/* Do the same with any others that were local to the previous buffer */
|
||||
|
||||
if (old_buf)
|
||||
for (tail = old_buf->local_var_alist; !NILP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = old_buf->local_var_alist; !NILP (tail); tail = XCDR (tail))
|
||||
{
|
||||
valcontents = XSYMBOL (XCONS (XCONS (tail)->car)->car)->value;
|
||||
valcontents = XSYMBOL (XCAR (XCAR (tail)))->value;
|
||||
if ((BUFFER_LOCAL_VALUEP (valcontents)
|
||||
|| SOME_BUFFER_LOCAL_VALUEP (valcontents))
|
||||
&& (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
|
||||
(BOOLFWDP (tem) || INTFWDP (tem) || OBJFWDP (tem))))
|
||||
/* Just reference the variable
|
||||
to cause it to become set for this buffer. */
|
||||
Fsymbol_value (XCONS (XCONS (tail)->car)->car);
|
||||
Fsymbol_value (XCAR (XCAR (tail)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1682,7 +1682,7 @@ selected window if it is displayed there.")
|
|||
aelt = Frassq (buffer, Vbuffer_alist);
|
||||
link = Fmemq (aelt, Vbuffer_alist);
|
||||
Vbuffer_alist = Fdelq (aelt, Vbuffer_alist);
|
||||
XCONS (link)->cdr = Qnil;
|
||||
XCDR (link) = Qnil;
|
||||
Vbuffer_alist = nconc2 (Vbuffer_alist, link);
|
||||
}
|
||||
|
||||
|
|
@ -1935,14 +1935,14 @@ the normal hook `change-major-mode-hook'.")
|
|||
/* Any which are supposed to be permanent,
|
||||
make local again, with the same values they had. */
|
||||
|
||||
for (alist = oalist; !NILP (alist); alist = XCONS (alist)->cdr)
|
||||
for (alist = oalist; !NILP (alist); alist = XCDR (alist))
|
||||
{
|
||||
sym = XCONS (XCONS (alist)->car)->car;
|
||||
sym = XCAR (XCAR (alist));
|
||||
tem = Fget (sym, Qpermanent_local);
|
||||
if (! NILP (tem))
|
||||
{
|
||||
Fmake_local_variable (sym);
|
||||
Fset (sym, XCONS (XCONS (alist)->car)->cdr);
|
||||
Fset (sym, XCDR (XCAR (alist)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1965,9 +1965,9 @@ swap_out_buffer_local_variables (b)
|
|||
XSETBUFFER (buffer, b);
|
||||
oalist = b->local_var_alist;
|
||||
|
||||
for (alist = oalist; !NILP (alist); alist = XCONS (alist)->cdr)
|
||||
for (alist = oalist; !NILP (alist); alist = XCDR (alist))
|
||||
{
|
||||
sym = XCONS (XCONS (alist)->car)->car;
|
||||
sym = XCAR (XCAR (alist));
|
||||
|
||||
/* Need not do anything if some other buffer's binding is now encached. */
|
||||
tem = XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->buffer;
|
||||
|
|
@ -1981,16 +1981,16 @@ swap_out_buffer_local_variables (b)
|
|||
it is currently set up for. This is so that, if the
|
||||
local is marked permanent, and we make it local again
|
||||
later in Fkill_all_local_variables, we don't lose the value. */
|
||||
XCONS (XCONS (tem)->car)->cdr
|
||||
XCDR (XCAR (tem))
|
||||
= do_symval_forwarding (XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->realvalue);
|
||||
/* Switch to the symbol's default-value alist entry. */
|
||||
XCONS (tem)->car = tem;
|
||||
XCAR (tem) = tem;
|
||||
/* Mark it as current for buffer B. */
|
||||
XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->buffer = buffer;
|
||||
/* Store the current value into any forwarding in the symbol. */
|
||||
store_symval_forwarding (sym,
|
||||
XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->realvalue,
|
||||
XCONS (tem)->cdr);
|
||||
XCDR (tem));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2032,11 +2032,11 @@ overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr)
|
|||
|
||||
for (tail = current_buffer->overlays_before;
|
||||
GC_CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int startpos, endpos;
|
||||
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
|
||||
start = OVERLAY_START (overlay);
|
||||
end = OVERLAY_END (overlay);
|
||||
|
|
@ -2085,11 +2085,11 @@ overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr)
|
|||
|
||||
for (tail = current_buffer->overlays_after;
|
||||
GC_CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int startpos, endpos;
|
||||
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
|
||||
start = OVERLAY_START (overlay);
|
||||
end = OVERLAY_END (overlay);
|
||||
|
|
@ -2175,11 +2175,11 @@ overlays_in (beg, end, extend, vec_ptr, len_ptr, next_ptr, prev_ptr)
|
|||
|
||||
for (tail = current_buffer->overlays_before;
|
||||
GC_CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int startpos, endpos;
|
||||
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
|
||||
ostart = OVERLAY_START (overlay);
|
||||
oend = OVERLAY_END (overlay);
|
||||
|
|
@ -2221,11 +2221,11 @@ overlays_in (beg, end, extend, vec_ptr, len_ptr, next_ptr, prev_ptr)
|
|||
|
||||
for (tail = current_buffer->overlays_after;
|
||||
GC_CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int startpos, endpos;
|
||||
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
|
||||
ostart = OVERLAY_START (overlay);
|
||||
oend = OVERLAY_END (overlay);
|
||||
|
|
@ -2277,11 +2277,11 @@ overlay_touches_p (pos)
|
|||
Lisp_Object tail, overlay;
|
||||
|
||||
for (tail = current_buffer->overlays_before; GC_CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int endpos;
|
||||
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
if (!GC_OVERLAYP (overlay))
|
||||
abort ();
|
||||
|
||||
|
|
@ -2293,11 +2293,11 @@ overlay_touches_p (pos)
|
|||
}
|
||||
|
||||
for (tail = current_buffer->overlays_after; GC_CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int startpos;
|
||||
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
if (!GC_OVERLAYP (overlay))
|
||||
abort ();
|
||||
|
||||
|
|
@ -2502,9 +2502,9 @@ overlay_strings (pos, w, pstr)
|
|||
|
||||
overlay_heads.used = overlay_heads.bytes = 0;
|
||||
overlay_tails.used = overlay_tails.bytes = 0;
|
||||
for (ov = current_buffer->overlays_before; CONSP (ov); ov = XCONS (ov)->cdr)
|
||||
for (ov = current_buffer->overlays_before; CONSP (ov); ov = XCDR (ov))
|
||||
{
|
||||
overlay = XCONS (ov)->car;
|
||||
overlay = XCAR (ov);
|
||||
if (!OVERLAYP (overlay))
|
||||
abort ();
|
||||
|
||||
|
|
@ -2531,9 +2531,9 @@ overlay_strings (pos, w, pstr)
|
|||
Foverlay_get (overlay, Qpriority),
|
||||
endpos - startpos);
|
||||
}
|
||||
for (ov = current_buffer->overlays_after; CONSP (ov); ov = XCONS (ov)->cdr)
|
||||
for (ov = current_buffer->overlays_after; CONSP (ov); ov = XCDR (ov))
|
||||
{
|
||||
overlay = XCONS (ov)->car;
|
||||
overlay = XCAR (ov);
|
||||
if (!OVERLAYP (overlay))
|
||||
abort ();
|
||||
|
||||
|
|
@ -2634,8 +2634,8 @@ recenter_overlay_lists (buf, pos)
|
|||
CONSP (tail);
|
||||
prev = tail, tail = next)
|
||||
{
|
||||
next = XCONS (tail)->cdr;
|
||||
overlay = XCONS (tail)->car;
|
||||
next = XCDR (tail);
|
||||
overlay = XCAR (tail);
|
||||
|
||||
/* If the overlay is not valid, get rid of it. */
|
||||
if (!OVERLAY_VALID (overlay))
|
||||
|
|
@ -2645,7 +2645,7 @@ recenter_overlay_lists (buf, pos)
|
|||
{
|
||||
/* Splice the cons cell TAIL out of overlays_before. */
|
||||
if (!NILP (prev))
|
||||
XCONS (prev)->cdr = next;
|
||||
XCDR (prev) = next;
|
||||
else
|
||||
buf->overlays_before = next;
|
||||
tail = prev;
|
||||
|
|
@ -2664,7 +2664,7 @@ recenter_overlay_lists (buf, pos)
|
|||
|
||||
/* Splice the cons cell TAIL out of overlays_before. */
|
||||
if (!NILP (prev))
|
||||
XCONS (prev)->cdr = next;
|
||||
XCDR (prev) = next;
|
||||
else
|
||||
buf->overlays_before = next;
|
||||
|
||||
|
|
@ -2672,11 +2672,11 @@ recenter_overlay_lists (buf, pos)
|
|||
other_prev = Qnil;
|
||||
for (other = buf->overlays_after;
|
||||
CONSP (other);
|
||||
other_prev = other, other = XCONS (other)->cdr)
|
||||
other_prev = other, other = XCDR (other))
|
||||
{
|
||||
Lisp_Object otherbeg, otheroverlay;
|
||||
|
||||
otheroverlay = XCONS (other)->car;
|
||||
otheroverlay = XCAR (other);
|
||||
if (! OVERLAY_VALID (otheroverlay))
|
||||
abort ();
|
||||
|
||||
|
|
@ -2686,9 +2686,9 @@ recenter_overlay_lists (buf, pos)
|
|||
}
|
||||
|
||||
/* Add TAIL to overlays_after before OTHER. */
|
||||
XCONS (tail)->cdr = other;
|
||||
XCDR (tail) = other;
|
||||
if (!NILP (other_prev))
|
||||
XCONS (other_prev)->cdr = tail;
|
||||
XCDR (other_prev) = tail;
|
||||
else
|
||||
buf->overlays_after = tail;
|
||||
tail = prev;
|
||||
|
|
@ -2706,8 +2706,8 @@ recenter_overlay_lists (buf, pos)
|
|||
CONSP (tail);
|
||||
prev = tail, tail = next)
|
||||
{
|
||||
next = XCONS (tail)->cdr;
|
||||
overlay = XCONS (tail)->car;
|
||||
next = XCDR (tail);
|
||||
overlay = XCAR (tail);
|
||||
|
||||
/* If the overlay is not valid, get rid of it. */
|
||||
if (!OVERLAY_VALID (overlay))
|
||||
|
|
@ -2717,7 +2717,7 @@ recenter_overlay_lists (buf, pos)
|
|||
{
|
||||
/* Splice the cons cell TAIL out of overlays_after. */
|
||||
if (!NILP (prev))
|
||||
XCONS (prev)->cdr = next;
|
||||
XCDR (prev) = next;
|
||||
else
|
||||
buf->overlays_after = next;
|
||||
tail = prev;
|
||||
|
|
@ -2741,7 +2741,7 @@ recenter_overlay_lists (buf, pos)
|
|||
|
||||
/* Splice the cons cell TAIL out of overlays_after. */
|
||||
if (!NILP (prev))
|
||||
XCONS (prev)->cdr = next;
|
||||
XCDR (prev) = next;
|
||||
else
|
||||
buf->overlays_after = next;
|
||||
|
||||
|
|
@ -2749,11 +2749,11 @@ recenter_overlay_lists (buf, pos)
|
|||
other_prev = Qnil;
|
||||
for (other = buf->overlays_before;
|
||||
CONSP (other);
|
||||
other_prev = other, other = XCONS (other)->cdr)
|
||||
other_prev = other, other = XCDR (other))
|
||||
{
|
||||
Lisp_Object otherend, otheroverlay;
|
||||
|
||||
otheroverlay = XCONS (other)->car;
|
||||
otheroverlay = XCAR (other);
|
||||
if (! OVERLAY_VALID (otheroverlay))
|
||||
abort ();
|
||||
|
||||
|
|
@ -2763,9 +2763,9 @@ recenter_overlay_lists (buf, pos)
|
|||
}
|
||||
|
||||
/* Add TAIL to overlays_before before OTHER. */
|
||||
XCONS (tail)->cdr = other;
|
||||
XCDR (tail) = other;
|
||||
if (!NILP (other_prev))
|
||||
XCONS (other_prev)->cdr = tail;
|
||||
XCDR (other_prev) = tail;
|
||||
else
|
||||
buf->overlays_before = tail;
|
||||
tail = prev;
|
||||
|
|
@ -2833,7 +2833,7 @@ fix_overlays_in_range (start, end)
|
|||
it may look strange. */
|
||||
for (ptail = ¤t_buffer->overlays_before; CONSP (*ptail);)
|
||||
{
|
||||
overlay = XCONS (*ptail)->car;
|
||||
overlay = XCAR (*ptail);
|
||||
endpos = OVERLAY_POSITION (OVERLAY_END (overlay));
|
||||
if (endpos < start)
|
||||
break;
|
||||
|
|
@ -2856,21 +2856,21 @@ fix_overlays_in_range (start, end)
|
|||
if (endpos < XINT (current_buffer->overlay_center))
|
||||
{
|
||||
*pafter = *ptail;
|
||||
pafter = &XCONS (*ptail)->cdr;
|
||||
pafter = &XCDR (*ptail);
|
||||
}
|
||||
else
|
||||
{
|
||||
*pbefore = *ptail;
|
||||
pbefore = &XCONS (*ptail)->cdr;
|
||||
pbefore = &XCDR (*ptail);
|
||||
}
|
||||
*ptail = XCONS (*ptail)->cdr;
|
||||
*ptail = XCDR (*ptail);
|
||||
}
|
||||
else
|
||||
ptail = &XCONS (*ptail)->cdr;
|
||||
ptail = &XCDR (*ptail);
|
||||
}
|
||||
for (ptail = ¤t_buffer->overlays_after; CONSP (*ptail);)
|
||||
{
|
||||
overlay = XCONS (*ptail)->car;
|
||||
overlay = XCAR (*ptail);
|
||||
startpos = OVERLAY_POSITION (OVERLAY_START (overlay));
|
||||
if (startpos >= end)
|
||||
break;
|
||||
|
|
@ -2890,17 +2890,17 @@ fix_overlays_in_range (start, end)
|
|||
if (endpos < XINT (current_buffer->overlay_center))
|
||||
{
|
||||
*pafter = *ptail;
|
||||
pafter = &XCONS (*ptail)->cdr;
|
||||
pafter = &XCDR (*ptail);
|
||||
}
|
||||
else
|
||||
{
|
||||
*pbefore = *ptail;
|
||||
pbefore = &XCONS (*ptail)->cdr;
|
||||
pbefore = &XCDR (*ptail);
|
||||
}
|
||||
*ptail = XCONS (*ptail)->cdr;
|
||||
*ptail = XCDR (*ptail);
|
||||
}
|
||||
else
|
||||
ptail = &XCONS (*ptail)->cdr;
|
||||
ptail = &XCDR (*ptail);
|
||||
}
|
||||
|
||||
/* Splice the constructed (wrong) lists into the buffer's lists,
|
||||
|
|
@ -2949,9 +2949,9 @@ fix_overlays_before (bp, prev, pos)
|
|||
overlay whose ending marker is after-insertion-marker if disorder
|
||||
exists). */
|
||||
while (!NILP (*tailp)
|
||||
&& ((end = OVERLAY_POSITION (OVERLAY_END (XCONS (*tailp)->car)))
|
||||
&& ((end = OVERLAY_POSITION (OVERLAY_END (XCAR (*tailp))))
|
||||
>= pos))
|
||||
tailp = &XCONS (*tailp)->cdr;
|
||||
tailp = &XCDR (*tailp);
|
||||
|
||||
/* If we don't find such an overlay,
|
||||
or the found one ends before PREV,
|
||||
|
|
@ -2959,11 +2959,11 @@ fix_overlays_before (bp, prev, pos)
|
|||
we don't have to fix anything. */
|
||||
if (NILP (*tailp)
|
||||
|| end < prev
|
||||
|| NILP (XCONS (*tailp)->cdr))
|
||||
|| NILP (XCDR (*tailp)))
|
||||
return;
|
||||
|
||||
right_place = tailp;
|
||||
tailp = &XCONS (*tailp)->cdr;
|
||||
tailp = &XCDR (*tailp);
|
||||
|
||||
/* Now, end position of overlays in the list *TAILP should be before
|
||||
or equal to PREV. In the loop, an overlay which ends at POS is
|
||||
|
|
@ -2972,21 +2972,21 @@ fix_overlays_before (bp, prev, pos)
|
|||
correct order. */
|
||||
while (!NILP (*tailp))
|
||||
{
|
||||
end = OVERLAY_POSITION (OVERLAY_END (XCONS (*tailp)->car));
|
||||
end = OVERLAY_POSITION (OVERLAY_END (XCAR (*tailp)));
|
||||
|
||||
if (end == pos)
|
||||
{ /* This overlay is disordered. */
|
||||
Lisp_Object found = *tailp;
|
||||
|
||||
/* Unlink the found overlay. */
|
||||
*tailp = XCONS (found)->cdr;
|
||||
*tailp = XCDR (found);
|
||||
/* Move an overlay at RIGHT_PLACE to the next of the found one. */
|
||||
XCONS (found)->cdr = *right_place;
|
||||
XCDR (found) = *right_place;
|
||||
/* Link it into the right place. */
|
||||
*right_place = found;
|
||||
}
|
||||
else if (end == prev)
|
||||
tailp = &XCONS (*tailp)->cdr;
|
||||
tailp = &XCDR (*tailp);
|
||||
else /* No more disordered overlay. */
|
||||
break;
|
||||
}
|
||||
|
|
@ -3457,12 +3457,12 @@ DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0,
|
|||
fallback = Qnil;
|
||||
|
||||
for (plist = XOVERLAY (overlay)->plist;
|
||||
CONSP (plist) && CONSP (XCONS (plist)->cdr);
|
||||
plist = XCONS (XCONS (plist)->cdr)->cdr)
|
||||
CONSP (plist) && CONSP (XCDR (plist));
|
||||
plist = XCDR (XCDR (plist)))
|
||||
{
|
||||
if (EQ (XCONS (plist)->car, prop))
|
||||
return XCONS (XCONS (plist)->cdr)->car;
|
||||
else if (EQ (XCONS (plist)->car, Qcategory))
|
||||
if (EQ (XCAR (plist), prop))
|
||||
return XCAR (XCDR (plist));
|
||||
else if (EQ (XCAR (plist), Qcategory))
|
||||
{
|
||||
Lisp_Object tem;
|
||||
tem = Fcar (Fcdr (plist));
|
||||
|
|
@ -3487,12 +3487,12 @@ DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0,
|
|||
buffer = Fmarker_buffer (OVERLAY_START (overlay));
|
||||
|
||||
for (tail = XOVERLAY (overlay)->plist;
|
||||
CONSP (tail) && CONSP (XCONS (tail)->cdr);
|
||||
tail = XCONS (XCONS (tail)->cdr)->cdr)
|
||||
if (EQ (XCONS (tail)->car, prop))
|
||||
CONSP (tail) && CONSP (XCDR (tail));
|
||||
tail = XCDR (XCDR (tail)))
|
||||
if (EQ (XCAR (tail), prop))
|
||||
{
|
||||
changed = !EQ (XCONS (XCONS (tail)->cdr)->car, value);
|
||||
XCONS (XCONS (tail)->cdr)->car = value;
|
||||
changed = !EQ (XCAR (XCDR (tail)), value);
|
||||
XCAR (XCDR (tail)) = value;
|
||||
goto found;
|
||||
}
|
||||
/* It wasn't in the list, so add it to the front. */
|
||||
|
|
@ -3615,12 +3615,12 @@ report_overlay_modification (start, end, after, arg1, arg2, arg3)
|
|||
tail_copied = 0;
|
||||
for (tail = current_buffer->overlays_before;
|
||||
CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int startpos, endpos;
|
||||
Lisp_Object ostart, oend;
|
||||
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
|
||||
ostart = OVERLAY_START (overlay);
|
||||
oend = OVERLAY_END (overlay);
|
||||
|
|
@ -3671,12 +3671,12 @@ report_overlay_modification (start, end, after, arg1, arg2, arg3)
|
|||
tail_copied = 0;
|
||||
for (tail = current_buffer->overlays_after;
|
||||
CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int startpos, endpos;
|
||||
Lisp_Object ostart, oend;
|
||||
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
|
||||
ostart = OVERLAY_START (overlay);
|
||||
oend = OVERLAY_END (overlay);
|
||||
|
|
@ -3760,10 +3760,10 @@ evaporate_overlays (pos)
|
|||
hit_list = Qnil;
|
||||
if (pos <= XFASTINT (current_buffer->overlay_center))
|
||||
for (tail = current_buffer->overlays_before; CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int endpos;
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
endpos = OVERLAY_POSITION (OVERLAY_END (overlay));
|
||||
if (endpos < pos)
|
||||
break;
|
||||
|
|
@ -3773,10 +3773,10 @@ evaporate_overlays (pos)
|
|||
}
|
||||
else
|
||||
for (tail = current_buffer->overlays_after; CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
int startpos;
|
||||
overlay = XCONS (tail)->car;
|
||||
overlay = XCAR (tail);
|
||||
startpos = OVERLAY_POSITION (OVERLAY_START (overlay));
|
||||
if (startpos > pos)
|
||||
break;
|
||||
|
|
@ -3784,8 +3784,8 @@ evaporate_overlays (pos)
|
|||
&& ! NILP (Foverlay_get (overlay, Qevaporate)))
|
||||
hit_list = Fcons (overlay, hit_list);
|
||||
}
|
||||
for (; CONSP (hit_list); hit_list = XCONS (hit_list)->cdr)
|
||||
Fdelete_overlay (XCONS (hit_list)->car);
|
||||
for (; CONSP (hit_list); hit_list = XCDR (hit_list))
|
||||
Fdelete_overlay (XCAR (hit_list));
|
||||
}
|
||||
|
||||
/* Somebody has tried to store a value with an unacceptable type
|
||||
|
|
|
|||
|
|
@ -148,11 +148,11 @@ quotify_args (exp)
|
|||
Lisp_Object exp;
|
||||
{
|
||||
register Lisp_Object tail;
|
||||
register struct Lisp_Cons *ptr;
|
||||
for (tail = exp; CONSP (tail); tail = ptr->cdr)
|
||||
Lisp_Object next;
|
||||
for (tail = exp; CONSP (tail); tail = next)
|
||||
{
|
||||
ptr = XCONS (tail);
|
||||
ptr->car = quotify_arg (ptr->car);
|
||||
next = XCDR (tail);
|
||||
XCAR (tail) = quotify_arg (XCAR (tail));
|
||||
}
|
||||
return exp;
|
||||
}
|
||||
|
|
|
|||
72
src/data.c
72
src/data.c
|
|
@ -510,7 +510,7 @@ Error if arg is not nil and not a cons cell. See also `car-safe'.")
|
|||
while (1)
|
||||
{
|
||||
if (CONSP (list))
|
||||
return XCONS (list)->car;
|
||||
return XCAR (list);
|
||||
else if (EQ (list, Qnil))
|
||||
return Qnil;
|
||||
else
|
||||
|
|
@ -524,7 +524,7 @@ DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0,
|
|||
Lisp_Object object;
|
||||
{
|
||||
if (CONSP (object))
|
||||
return XCONS (object)->car;
|
||||
return XCAR (object);
|
||||
else
|
||||
return Qnil;
|
||||
}
|
||||
|
|
@ -539,7 +539,7 @@ Error if arg is not nil and not a cons cell. See also `cdr-safe'.")
|
|||
while (1)
|
||||
{
|
||||
if (CONSP (list))
|
||||
return XCONS (list)->cdr;
|
||||
return XCDR (list);
|
||||
else if (EQ (list, Qnil))
|
||||
return Qnil;
|
||||
else
|
||||
|
|
@ -553,7 +553,7 @@ DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0,
|
|||
Lisp_Object object;
|
||||
{
|
||||
if (CONSP (object))
|
||||
return XCONS (object)->cdr;
|
||||
return XCDR (object);
|
||||
else
|
||||
return Qnil;
|
||||
}
|
||||
|
|
@ -567,7 +567,7 @@ DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0,
|
|||
cell = wrong_type_argument (Qconsp, cell);
|
||||
|
||||
CHECK_IMPURE (cell);
|
||||
XCONS (cell)->car = newcar;
|
||||
XCAR (cell) = newcar;
|
||||
return newcar;
|
||||
}
|
||||
|
||||
|
|
@ -580,7 +580,7 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0,
|
|||
cell = wrong_type_argument (Qconsp, cell);
|
||||
|
||||
CHECK_IMPURE (cell);
|
||||
XCONS (cell)->cdr = newcdr;
|
||||
XCDR (cell) = newcdr;
|
||||
return newcdr;
|
||||
}
|
||||
|
||||
|
|
@ -846,7 +846,7 @@ swap_in_symval_forwarding (symbol, valcontents)
|
|||
if (NILP (tem1) || current_buffer != XBUFFER (tem1)
|
||||
|| !EQ (selected_frame, XBUFFER_LOCAL_VALUE (valcontents)->frame))
|
||||
{
|
||||
tem1 = XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->car;
|
||||
tem1 = XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr);
|
||||
Fsetcdr (tem1,
|
||||
do_symval_forwarding (XBUFFER_LOCAL_VALUE (valcontents)->realvalue));
|
||||
tem1 = assq_no_quit (symbol, current_buffer->local_var_alist);
|
||||
|
|
@ -864,7 +864,7 @@ swap_in_symval_forwarding (symbol, valcontents)
|
|||
else
|
||||
XBUFFER_LOCAL_VALUE (valcontents)->found_for_buffer = 1;
|
||||
|
||||
XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->car = tem1;
|
||||
XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr) = tem1;
|
||||
XSETBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer, current_buffer);
|
||||
XBUFFER_LOCAL_VALUE (valcontents)->frame = selected_frame;
|
||||
store_symval_forwarding (symbol,
|
||||
|
|
@ -1006,7 +1006,7 @@ set_internal (symbol, newval, bindflag)
|
|||
|
||||
/* What value are we caching right now? */
|
||||
current_alist_element
|
||||
= XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->car;
|
||||
= XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr);
|
||||
|
||||
/* If the current buffer is not the buffer whose binding is
|
||||
currently cached, or if it's a Lisp_Buffer_Local_Value and
|
||||
|
|
@ -1015,7 +1015,7 @@ set_internal (symbol, newval, bindflag)
|
|||
if (current_buffer != XBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer)
|
||||
|| !EQ (selected_frame, XBUFFER_LOCAL_VALUE (valcontents)->frame)
|
||||
|| (BUFFER_LOCAL_VALUEP (valcontents)
|
||||
&& EQ (XCONS (current_alist_element)->car,
|
||||
&& EQ (XCAR (current_alist_element),
|
||||
current_alist_element)))
|
||||
{
|
||||
/* Write out the cached value for the old buffer; copy it
|
||||
|
|
@ -1062,7 +1062,7 @@ set_internal (symbol, newval, bindflag)
|
|||
}
|
||||
|
||||
/* Cache the new buffer's assoc in CURRENT-ALIST-ELEMENT. */
|
||||
XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->car
|
||||
XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr)
|
||||
= tem1;
|
||||
|
||||
/* Set BUFFER and FRAME for binding now loaded. */
|
||||
|
|
@ -1117,12 +1117,12 @@ default_value (symbol)
|
|||
ordinary setq stores just that slot. So use that. */
|
||||
Lisp_Object current_alist_element, alist_element_car;
|
||||
current_alist_element
|
||||
= XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->car;
|
||||
alist_element_car = XCONS (current_alist_element)->car;
|
||||
= XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr);
|
||||
alist_element_car = XCAR (current_alist_element);
|
||||
if (EQ (alist_element_car, current_alist_element))
|
||||
return do_symval_forwarding (XBUFFER_LOCAL_VALUE (valcontents)->realvalue);
|
||||
else
|
||||
return XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->cdr;
|
||||
return XCDR (XBUFFER_LOCAL_VALUE (valcontents)->cdr);
|
||||
}
|
||||
/* For other variables, get the current value. */
|
||||
return do_symval_forwarding (valcontents);
|
||||
|
|
@ -1197,11 +1197,11 @@ for this variable.")
|
|||
return Fset (symbol, value);
|
||||
|
||||
/* Store new value into the DEFAULT-VALUE slot */
|
||||
XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->cdr = value;
|
||||
XCDR (XBUFFER_LOCAL_VALUE (valcontents)->cdr) = value;
|
||||
|
||||
/* If that slot is current, we must set the REALVALUE slot too */
|
||||
current_alist_element
|
||||
= XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->car;
|
||||
= XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr);
|
||||
alist_element_buffer = Fcar (current_alist_element);
|
||||
if (EQ (alist_element_buffer, current_alist_element))
|
||||
store_symval_forwarding (symbol, XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
|
||||
|
|
@ -1280,7 +1280,7 @@ The function `default-value' gets the default value and `set-default' sets it.")
|
|||
if (EQ (valcontents, Qunbound))
|
||||
XSYMBOL (variable)->value = Qnil;
|
||||
tem = Fcons (Qnil, Fsymbol_value (variable));
|
||||
XCONS (tem)->car = tem;
|
||||
XCAR (tem) = tem;
|
||||
newval = allocate_misc ();
|
||||
XMISCTYPE (newval) = Lisp_Misc_Buffer_Local_Value;
|
||||
XBUFFER_LOCAL_VALUE (newval)->realvalue = XSYMBOL (variable)->value;
|
||||
|
|
@ -1337,7 +1337,7 @@ Use `make-local-hook' instead.")
|
|||
{
|
||||
Lisp_Object newval;
|
||||
tem = Fcons (Qnil, do_symval_forwarding (valcontents));
|
||||
XCONS (tem)->car = tem;
|
||||
XCAR (tem) = tem;
|
||||
newval = allocate_misc ();
|
||||
XMISCTYPE (newval) = Lisp_Misc_Some_Buffer_Local_Value;
|
||||
XBUFFER_LOCAL_VALUE (newval)->realvalue = XSYMBOL (variable)->value;
|
||||
|
|
@ -1359,7 +1359,7 @@ Use `make-local-hook' instead.")
|
|||
find_symbol_value (variable);
|
||||
|
||||
current_buffer->local_var_alist
|
||||
= Fcons (Fcons (variable, XCONS (XBUFFER_LOCAL_VALUE (XSYMBOL (variable)->value)->cdr)->cdr),
|
||||
= Fcons (Fcons (variable, XCDR (XBUFFER_LOCAL_VALUE (XSYMBOL (variable)->value)->cdr)),
|
||||
current_buffer->local_var_alist);
|
||||
|
||||
/* Make sure symbol does not think it is set up for this buffer;
|
||||
|
|
@ -1474,7 +1474,7 @@ See `modify-frame-parameters'.")
|
|||
if (EQ (valcontents, Qunbound))
|
||||
XSYMBOL (variable)->value = Qnil;
|
||||
tem = Fcons (Qnil, Fsymbol_value (variable));
|
||||
XCONS (tem)->car = tem;
|
||||
XCAR (tem) = tem;
|
||||
newval = allocate_misc ();
|
||||
XMISCTYPE (newval) = Lisp_Misc_Some_Buffer_Local_Value;
|
||||
XBUFFER_LOCAL_VALUE (newval)->realvalue = XSYMBOL (variable)->value;
|
||||
|
|
@ -1513,10 +1513,10 @@ BUFFER defaults to the current buffer.")
|
|||
|| SOME_BUFFER_LOCAL_VALUEP (valcontents))
|
||||
{
|
||||
Lisp_Object tail, elt;
|
||||
for (tail = buf->local_var_alist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
elt = XCONS (tail)->car;
|
||||
if (EQ (variable, XCONS (elt)->car))
|
||||
elt = XCAR (tail);
|
||||
if (EQ (variable, XCAR (elt)))
|
||||
return Qt;
|
||||
}
|
||||
}
|
||||
|
|
@ -1561,10 +1561,10 @@ BUFFER defaults to the current buffer.")
|
|||
if (SOME_BUFFER_LOCAL_VALUEP (valcontents))
|
||||
{
|
||||
Lisp_Object tail, elt;
|
||||
for (tail = buf->local_var_alist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
elt = XCONS (tail)->car;
|
||||
if (EQ (variable, XCONS (elt)->car))
|
||||
elt = XCAR (tail);
|
||||
if (EQ (variable, XCAR (elt)))
|
||||
return Qt;
|
||||
}
|
||||
}
|
||||
|
|
@ -1896,8 +1896,8 @@ arithcompare (num1, num2, comparison)
|
|||
if (FLOATP (num1) || FLOATP (num2))
|
||||
{
|
||||
floatp = 1;
|
||||
f1 = (FLOATP (num1)) ? XFLOAT (num1)->data : XINT (num1);
|
||||
f2 = (FLOATP (num2)) ? XFLOAT (num2)->data : XINT (num2);
|
||||
f1 = (FLOATP (num1)) ? XFLOAT_DATA (num1) : XINT (num1);
|
||||
f2 = (FLOATP (num2)) ? XFLOAT_DATA (num2) : XINT (num2);
|
||||
}
|
||||
#else
|
||||
CHECK_NUMBER_COERCE_MARKER (num1, 0);
|
||||
|
|
@ -2000,7 +2000,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, "Return t if NUMBER is zero.")
|
|||
|
||||
if (FLOATP (number))
|
||||
{
|
||||
if (XFLOAT(number)->data == 0.0)
|
||||
if (XFLOAT_DATA (number) == 0.0)
|
||||
return Qt;
|
||||
return Qnil;
|
||||
}
|
||||
|
|
@ -2035,10 +2035,10 @@ cons_to_long (c)
|
|||
Lisp_Object top, bot;
|
||||
if (INTEGERP (c))
|
||||
return XINT (c);
|
||||
top = XCONS (c)->car;
|
||||
bot = XCONS (c)->cdr;
|
||||
top = XCAR (c);
|
||||
bot = XCDR (c);
|
||||
if (CONSP (bot))
|
||||
bot = XCONS (bot)->car;
|
||||
bot = XCAR (bot);
|
||||
return ((XINT (top) << 16) | XINT (bot));
|
||||
}
|
||||
|
||||
|
|
@ -2060,7 +2060,7 @@ NUMBER may be an integer or a floating point number.")
|
|||
{
|
||||
char pigbuf[350]; /* see comments in float_to_string */
|
||||
|
||||
float_to_string (pigbuf, XFLOAT(number)->data);
|
||||
float_to_string (pigbuf, XFLOAT_DATA (number));
|
||||
return build_string (pigbuf);
|
||||
}
|
||||
#endif /* LISP_FLOAT_TYPE */
|
||||
|
|
@ -2249,7 +2249,7 @@ float_arith_driver (accum, argnum, code, nargs, args)
|
|||
|
||||
if (FLOATP (val))
|
||||
{
|
||||
next = XFLOAT (val)->data;
|
||||
next = XFLOAT_DATA (val);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2520,7 +2520,7 @@ Markers are converted to integers.")
|
|||
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number, 0);
|
||||
|
||||
if (FLOATP (number))
|
||||
return (make_float (1.0 + XFLOAT (number)->data));
|
||||
return (make_float (1.0 + XFLOAT_DATA (number)));
|
||||
#else
|
||||
CHECK_NUMBER_COERCE_MARKER (number, 0);
|
||||
#endif /* LISP_FLOAT_TYPE */
|
||||
|
|
@ -2539,7 +2539,7 @@ Markers are converted to integers.")
|
|||
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number, 0);
|
||||
|
||||
if (FLOATP (number))
|
||||
return (make_float (-1.0 + XFLOAT (number)->data));
|
||||
return (make_float (-1.0 + XFLOAT_DATA (number)));
|
||||
#else
|
||||
CHECK_NUMBER_COERCE_MARKER (number, 0);
|
||||
#endif /* LISP_FLOAT_TYPE */
|
||||
|
|
|
|||
|
|
@ -5693,9 +5693,9 @@ the current state.\n")
|
|||
No need to test for the end of the vector
|
||||
because the last element of the vector is lambda
|
||||
and that will always cause a mismatch. */
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
buf = XCONS (XCONS (tail)->car)->cdr;
|
||||
buf = XCDR (XCAR (tail));
|
||||
/* Ignore buffers that aren't included in buffer lists. */
|
||||
if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ')
|
||||
continue;
|
||||
|
|
@ -5714,7 +5714,7 @@ the current state.\n")
|
|||
n = 1;
|
||||
FOR_EACH_FRAME (tail, frame)
|
||||
n += 2;
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
|
||||
n += 3;
|
||||
/* Reallocate the vector if it's grown, or if it's shrunk a lot. */
|
||||
if (n > XVECTOR (frame_and_buffer_state)->size
|
||||
|
|
@ -5727,9 +5727,9 @@ the current state.\n")
|
|||
*vecp++ = frame;
|
||||
*vecp++ = XFRAME (frame)->name;
|
||||
}
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
buf = XCONS (XCONS (tail)->car)->cdr;
|
||||
buf = XCDR (XCAR (tail));
|
||||
/* Ignore buffers that aren't included in buffer lists. */
|
||||
if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ')
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1077,11 +1077,11 @@ the Bugs section of the Emacs manual or the file BUGS.\n", argv[0]);
|
|||
}
|
||||
|
||||
for (tail = Vbuffer_alist; CONSP (tail);
|
||||
tail = XCONS (tail)->cdr)
|
||||
tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object buffer;
|
||||
|
||||
buffer = Fcdr (XCONS (tail)->car);
|
||||
buffer = Fcdr (XCAR (tail));
|
||||
/* Verify that all buffers are empty now, as they
|
||||
ought to be. */
|
||||
if (BUF_Z (XBUFFER (buffer)) > BUF_BEG (XBUFFER (buffer)))
|
||||
|
|
|
|||
|
|
@ -218,24 +218,24 @@ fs_load_font (f, font_table, charset, fontname, fontset)
|
|||
for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i <= MAX_CHARSET; i++)
|
||||
fontp->encoding[i] = 1;
|
||||
/* Then override them by a specification in Vfont_encoding_alist. */
|
||||
for (list = Vfont_encoding_alist; CONSP (list); list = XCONS (list)->cdr)
|
||||
for (list = Vfont_encoding_alist; CONSP (list); list = XCDR (list))
|
||||
{
|
||||
elt = XCONS (list)->car;
|
||||
elt = XCAR (list);
|
||||
if (CONSP (elt)
|
||||
&& STRINGP (XCONS (elt)->car) && CONSP (XCONS (elt)->cdr)
|
||||
&& (fast_c_string_match_ignore_case (XCONS (elt)->car, fontname)
|
||||
&& STRINGP (XCAR (elt)) && CONSP (XCDR (elt))
|
||||
&& (fast_c_string_match_ignore_case (XCAR (elt), fontname)
|
||||
>= 0))
|
||||
{
|
||||
Lisp_Object tmp;
|
||||
|
||||
for (tmp = XCONS (elt)->cdr; CONSP (tmp); tmp = XCONS (tmp)->cdr)
|
||||
if (CONSP (XCONS (tmp)->car)
|
||||
&& ((i = get_charset_id (XCONS (XCONS (tmp)->car)->car))
|
||||
for (tmp = XCDR (elt); CONSP (tmp); tmp = XCDR (tmp))
|
||||
if (CONSP (XCAR (tmp))
|
||||
&& ((i = get_charset_id (XCAR (XCAR (tmp))))
|
||||
>= 0)
|
||||
&& INTEGERP (XCONS (XCONS (tmp)->car)->cdr)
|
||||
&& XFASTINT (XCONS (XCONS (tmp)->car)->cdr) < 4)
|
||||
&& INTEGERP (XCDR (XCAR (tmp)))
|
||||
&& XFASTINT (XCDR (XCAR (tmp))) < 4)
|
||||
fontp->encoding[i]
|
||||
= XFASTINT (XCONS (XCONS (tmp)->car)->cdr);
|
||||
= XFASTINT (XCDR (XCAR (tmp)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -328,12 +328,12 @@ fs_register_fontset (f, fontset_info)
|
|||
int i;
|
||||
|
||||
if (!CONSP (fontset_info)
|
||||
|| !STRINGP (XCONS (fontset_info)->car)
|
||||
|| !CONSP (XCONS (fontset_info)->cdr))
|
||||
|| !STRINGP (XCAR (fontset_info))
|
||||
|| !CONSP (XCDR (fontset_info)))
|
||||
/* Invalid data in FONTSET_INFO. */
|
||||
return -1;
|
||||
|
||||
name = XCONS (fontset_info)->car;
|
||||
name = XCAR (fontset_info);
|
||||
if ((fontset = fs_query_fontset (f, XSTRING (name)->data)) >= 0)
|
||||
/* This fontset already exists on frame F. */
|
||||
return fontset;
|
||||
|
|
@ -351,21 +351,21 @@ fs_register_fontset (f, fontset_info)
|
|||
fontsetp->font_indexes[i] = FONT_NOT_OPENED;
|
||||
}
|
||||
|
||||
for (fontlist = XCONS (fontset_info)->cdr; CONSP (fontlist);
|
||||
fontlist = XCONS (fontlist)->cdr)
|
||||
for (fontlist = XCDR (fontset_info); CONSP (fontlist);
|
||||
fontlist = XCDR (fontlist))
|
||||
{
|
||||
Lisp_Object tem = Fcar (fontlist);
|
||||
int charset;
|
||||
|
||||
if (CONSP (tem)
|
||||
&& (charset = get_charset_id (XCONS (tem)->car)) >= 0
|
||||
&& STRINGP (XCONS (tem)->cdr))
|
||||
&& (charset = get_charset_id (XCAR (tem))) >= 0
|
||||
&& STRINGP (XCDR (tem)))
|
||||
{
|
||||
fontsetp->fontname[charset]
|
||||
= (char *) xmalloc (XSTRING (XCONS (tem)->cdr)->size + 1);
|
||||
bcopy (XSTRING (XCONS (tem)->cdr)->data,
|
||||
= (char *) xmalloc (XSTRING (XCDR (tem))->size + 1);
|
||||
bcopy (XSTRING (XCDR (tem))->data,
|
||||
fontsetp->fontname[charset],
|
||||
XSTRING (XCONS (tem)->cdr)->size + 1);
|
||||
XSTRING (XCDR (tem))->size + 1);
|
||||
}
|
||||
else
|
||||
/* Broken or invalid data structure. */
|
||||
|
|
@ -400,8 +400,8 @@ fs_register_fontset (f, fontset_info)
|
|||
the corresponding regular expression. */
|
||||
static Lisp_Object Vcached_fontset_data;
|
||||
|
||||
#define CACHED_FONTSET_NAME (XSTRING (XCONS (Vcached_fontset_data)->car)->data)
|
||||
#define CACHED_FONTSET_REGEX (XCONS (Vcached_fontset_data)->cdr)
|
||||
#define CACHED_FONTSET_NAME (XSTRING (XCAR (Vcached_fontset_data))->data)
|
||||
#define CACHED_FONTSET_REGEX (XCDR (Vcached_fontset_data))
|
||||
|
||||
/* If fontset name PATTERN contains any wild card, return regular
|
||||
expression corresponding to PATTERN. */
|
||||
|
|
@ -473,9 +473,9 @@ If REGEXPP is non-nil, PATTERN is a regular expression.")
|
|||
else
|
||||
regexp = pattern;
|
||||
|
||||
for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCONS (tem)->cdr)
|
||||
for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCDR (tem))
|
||||
{
|
||||
Lisp_Object fontset_name = XCONS (XCONS (tem)->car)->car;
|
||||
Lisp_Object fontset_name = XCAR (XCAR (tem));
|
||||
if (!NILP (regexp))
|
||||
{
|
||||
if (fast_c_string_match_ignore_case (regexp,
|
||||
|
|
@ -574,14 +574,14 @@ FONTLIST is an alist of charsets vs corresponding font names.")
|
|||
XSTRING (name)->data, XSTRING (fullname)->data);
|
||||
|
||||
/* Check the validity of FONTLIST. */
|
||||
for (tail = fontlist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = fontlist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object tem = XCONS (tail)->car;
|
||||
Lisp_Object tem = XCAR (tail);
|
||||
int charset;
|
||||
|
||||
if (!CONSP (tem)
|
||||
|| (charset = get_charset_id (XCONS (tem)->car)) < 0
|
||||
|| !STRINGP (XCONS (tem)->cdr))
|
||||
|| (charset = get_charset_id (XCAR (tem))) < 0
|
||||
|| !STRINGP (XCDR (tem)))
|
||||
error ("Elements of fontlist must be a cons of charset and font name");
|
||||
}
|
||||
|
||||
|
|
@ -632,14 +632,14 @@ If FRAME is omitted or nil, all frames are affected.")
|
|||
if (NILP (frame))
|
||||
{
|
||||
Lisp_Object fontset_info = Fassoc (fullname, Vglobal_fontset_alist);
|
||||
Lisp_Object tem = Fassq (charset_symbol, XCONS (fontset_info)->cdr);
|
||||
Lisp_Object tem = Fassq (charset_symbol, XCDR (fontset_info));
|
||||
|
||||
if (NILP (tem))
|
||||
XCONS (fontset_info)->cdr
|
||||
XCDR (fontset_info)
|
||||
= Fcons (Fcons (charset_symbol, fontname),
|
||||
XCONS (fontset_info)->cdr);
|
||||
XCDR (fontset_info));
|
||||
else
|
||||
XCONS (tem)->cdr = fontname;
|
||||
XCDR (tem) = fontname;
|
||||
}
|
||||
|
||||
/* Then, update information in the specified frame or all existing
|
||||
|
|
@ -671,7 +671,7 @@ If FRAME is omitted or nil, all frames are affected.")
|
|||
if (set_frame_fontset_func
|
||||
&& !NILP (font_param)
|
||||
&& !strcmp (XSTRING (fullname)->data,
|
||||
XSTRING (XCONS (font_param)->cdr)->data))
|
||||
XSTRING (XCDR (font_param))->data))
|
||||
/* This fontset is the default fontset on frame TEM.
|
||||
We may have to resize this frame because of new
|
||||
ASCII font. */
|
||||
|
|
|
|||
44
src/frame.c
44
src/frame.c
|
|
@ -631,9 +631,9 @@ do_switch_frame (frame, no_enter, track)
|
|||
/* If FRAME is a switch-frame event, extract the frame we should
|
||||
switch to. */
|
||||
if (CONSP (frame)
|
||||
&& EQ (XCONS (frame)->car, Qswitch_frame)
|
||||
&& CONSP (XCONS (frame)->cdr))
|
||||
frame = XCONS (XCONS (frame)->cdr)->car;
|
||||
&& EQ (XCAR (frame), Qswitch_frame)
|
||||
&& CONSP (XCDR (frame)))
|
||||
frame = XCAR (XCDR (frame));
|
||||
|
||||
/* This used to say CHECK_LIVE_FRAME, but apparently it's possible for
|
||||
a switch-frame event to arrive after a frame is no longer live,
|
||||
|
|
@ -659,17 +659,17 @@ do_switch_frame (frame, no_enter, track)
|
|||
{
|
||||
Lisp_Object tail;
|
||||
|
||||
for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object focus;
|
||||
|
||||
if (!FRAMEP (XCONS (tail)->car))
|
||||
if (!FRAMEP (XCAR (tail)))
|
||||
abort ();
|
||||
|
||||
focus = FRAME_FOCUS_FRAME (XFRAME (XCONS (tail)->car));
|
||||
focus = FRAME_FOCUS_FRAME (XFRAME (XCAR (tail)));
|
||||
|
||||
if (FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ())
|
||||
Fredirect_frame_focus (XCONS (tail)->car, frame);
|
||||
Fredirect_frame_focus (XCAR (tail), frame);
|
||||
}
|
||||
}
|
||||
#else /* ! 0 */
|
||||
|
|
@ -893,11 +893,11 @@ next_frame (frame, minibuf)
|
|||
CHECK_LIVE_FRAME (frame, 0);
|
||||
|
||||
while (1)
|
||||
for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object f;
|
||||
|
||||
f = XCONS (tail)->car;
|
||||
f = XCAR (tail);
|
||||
|
||||
if (passed
|
||||
&& FRAME_KBOARD (XFRAME (f)) == FRAME_KBOARD (XFRAME (frame)))
|
||||
|
|
@ -968,11 +968,11 @@ prev_frame (frame, minibuf)
|
|||
abort ();
|
||||
|
||||
prev = Qnil;
|
||||
for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object f;
|
||||
|
||||
f = XCONS (tail)->car;
|
||||
f = XCAR (tail);
|
||||
if (!FRAMEP (f))
|
||||
abort ();
|
||||
|
||||
|
|
@ -1087,11 +1087,11 @@ other_visible_frames (f)
|
|||
|
||||
for (frames = Vframe_list;
|
||||
CONSP (frames);
|
||||
frames = XCONS (frames)->cdr)
|
||||
frames = XCDR (frames))
|
||||
{
|
||||
Lisp_Object this;
|
||||
|
||||
this = XCONS (frames)->car;
|
||||
this = XCAR (frames);
|
||||
/* Verify that the frame's window still exists
|
||||
and we can still talk to it. And note any recent change
|
||||
in visibility. */
|
||||
|
|
@ -1148,7 +1148,7 @@ but if the second optional argument FORCE is non-nil, you may do so.")
|
|||
#if 0
|
||||
/* This is a nice idea, but x_connection_closed needs to be able
|
||||
to delete the last frame, if it is gone. */
|
||||
if (NILP (XCONS (Vframe_list)->cdr))
|
||||
if (NILP (XCDR (Vframe_list)))
|
||||
error ("Attempt to delete the only frame");
|
||||
#endif
|
||||
|
||||
|
|
@ -1160,10 +1160,10 @@ but if the second optional argument FORCE is non-nil, you may do so.")
|
|||
|
||||
for (frames = Vframe_list;
|
||||
CONSP (frames);
|
||||
frames = XCONS (frames)->cdr)
|
||||
frames = XCDR (frames))
|
||||
{
|
||||
Lisp_Object this;
|
||||
this = XCONS (frames)->car;
|
||||
this = XCAR (frames);
|
||||
|
||||
if (! EQ (this, frame)
|
||||
&& EQ (frame,
|
||||
|
|
@ -1280,9 +1280,9 @@ but if the second optional argument FORCE is non-nil, you may do so.")
|
|||
|
||||
for (frames = Vframe_list;
|
||||
CONSP (frames);
|
||||
frames = XCONS (frames)->cdr)
|
||||
frames = XCDR (frames))
|
||||
{
|
||||
f = XFRAME (XCONS (frames)->car);
|
||||
f = XFRAME (XCAR (frames));
|
||||
if (!FRAME_MINIBUF_ONLY_P (f))
|
||||
{
|
||||
last_nonminibuf_frame = f;
|
||||
|
|
@ -1308,12 +1308,12 @@ but if the second optional argument FORCE is non-nil, you may do so.")
|
|||
|
||||
for (frames = Vframe_list;
|
||||
CONSP (frames);
|
||||
frames = XCONS (frames)->cdr)
|
||||
frames = XCDR (frames))
|
||||
{
|
||||
Lisp_Object this;
|
||||
struct frame *f1;
|
||||
|
||||
this = XCONS (frames)->car;
|
||||
this = XCAR (frames);
|
||||
if (!FRAMEP (this))
|
||||
abort ();
|
||||
f1 = XFRAME (this);
|
||||
|
|
@ -1662,9 +1662,9 @@ DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list,
|
|||
Lisp_Object value;
|
||||
|
||||
value = Qnil;
|
||||
for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
frame = XCONS (tail)->car;
|
||||
frame = XCAR (tail);
|
||||
if (!FRAMEP (frame))
|
||||
continue;
|
||||
f = XFRAME (frame);
|
||||
|
|
|
|||
298
src/keyboard.c
298
src/keyboard.c
|
|
@ -1849,16 +1849,16 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
reread = 0;
|
||||
if (CONSP (Vunread_post_input_method_events))
|
||||
{
|
||||
c = XCONS (Vunread_post_input_method_events)->car;
|
||||
c = XCAR (Vunread_post_input_method_events);
|
||||
Vunread_post_input_method_events
|
||||
= XCONS (Vunread_post_input_method_events)->cdr;
|
||||
= XCDR (Vunread_post_input_method_events);
|
||||
|
||||
/* Undo what read_char_x_menu_prompt did when it unread
|
||||
additional keys returned by Fx_popup_menu. */
|
||||
if (CONSP (c)
|
||||
&& (SYMBOLP (XCONS (c)->car) || INTEGERP (XCONS (c)->car))
|
||||
&& NILP (XCONS (c)->cdr))
|
||||
c = XCONS (c)->car;
|
||||
&& (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c)))
|
||||
&& NILP (XCDR (c)))
|
||||
c = XCAR (c);
|
||||
|
||||
reread = 1;
|
||||
goto reread_first;
|
||||
|
|
@ -1875,15 +1875,15 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
|
||||
if (CONSP (Vunread_command_events))
|
||||
{
|
||||
c = XCONS (Vunread_command_events)->car;
|
||||
Vunread_command_events = XCONS (Vunread_command_events)->cdr;
|
||||
c = XCAR (Vunread_command_events);
|
||||
Vunread_command_events = XCDR (Vunread_command_events);
|
||||
|
||||
/* Undo what read_char_x_menu_prompt did when it unread
|
||||
additional keys returned by Fx_popup_menu. */
|
||||
if (CONSP (c)
|
||||
&& (SYMBOLP (XCONS (c)->car) || INTEGERP (XCONS (c)->car))
|
||||
&& NILP (XCONS (c)->cdr))
|
||||
c = XCONS (c)->car;
|
||||
&& (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c)))
|
||||
&& NILP (XCDR (c)))
|
||||
c = XCAR (c);
|
||||
|
||||
reread = 1;
|
||||
goto reread_for_input_method;
|
||||
|
|
@ -1891,15 +1891,15 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
|
||||
if (CONSP (Vunread_input_method_events))
|
||||
{
|
||||
c = XCONS (Vunread_input_method_events)->car;
|
||||
Vunread_input_method_events = XCONS (Vunread_input_method_events)->cdr;
|
||||
c = XCAR (Vunread_input_method_events);
|
||||
Vunread_input_method_events = XCDR (Vunread_input_method_events);
|
||||
|
||||
/* Undo what read_char_x_menu_prompt did when it unread
|
||||
additional keys returned by Fx_popup_menu. */
|
||||
if (CONSP (c)
|
||||
&& (SYMBOLP (XCONS (c)->car) || INTEGERP (XCONS (c)->car))
|
||||
&& NILP (XCONS (c)->cdr))
|
||||
c = XCONS (c)->car;
|
||||
&& (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c)))
|
||||
&& NILP (XCDR (c)))
|
||||
c = XCAR (c);
|
||||
reread = 1;
|
||||
goto reread_for_input_method;
|
||||
}
|
||||
|
|
@ -2037,7 +2037,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
if (single_kboard)
|
||||
abort ();
|
||||
while (CONSP (*tailp))
|
||||
tailp = &XCONS (*tailp)->cdr;
|
||||
tailp = &XCDR (*tailp);
|
||||
if (!NILP (*tailp))
|
||||
abort ();
|
||||
*tailp = Fcons (c, Qnil);
|
||||
|
|
@ -2112,8 +2112,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
if (nmaps > 0 && INTERACTIVE
|
||||
&& !NILP (prev_event)
|
||||
&& EVENT_HAS_PARAMETERS (prev_event)
|
||||
&& !EQ (XCONS (prev_event)->car, Qmenu_bar)
|
||||
&& !EQ (XCONS (prev_event)->car, Qtool_bar)
|
||||
&& !EQ (XCAR (prev_event), Qmenu_bar)
|
||||
&& !EQ (XCAR (prev_event), Qtool_bar)
|
||||
/* Don't bring up a menu if we already have another event. */
|
||||
&& NILP (Vunread_command_events)
|
||||
&& unread_command_char < 0)
|
||||
|
|
@ -2179,8 +2179,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
or sentinel or filter. */
|
||||
if (CONSP (Vunread_command_events))
|
||||
{
|
||||
c = XCONS (Vunread_command_events)->car;
|
||||
Vunread_command_events = XCONS (Vunread_command_events)->cdr;
|
||||
c = XCAR (Vunread_command_events);
|
||||
Vunread_command_events = XCDR (Vunread_command_events);
|
||||
}
|
||||
|
||||
/* Read something from current KBOARD's side queue, if possible. */
|
||||
|
|
@ -2191,15 +2191,15 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
{
|
||||
if (!CONSP (current_kboard->kbd_queue))
|
||||
abort ();
|
||||
c = XCONS (current_kboard->kbd_queue)->car;
|
||||
c = XCAR (current_kboard->kbd_queue);
|
||||
current_kboard->kbd_queue
|
||||
= XCONS (current_kboard->kbd_queue)->cdr;
|
||||
= XCDR (current_kboard->kbd_queue);
|
||||
if (NILP (current_kboard->kbd_queue))
|
||||
current_kboard->kbd_queue_has_data = 0;
|
||||
input_pending = readable_events (0);
|
||||
if (EVENT_HAS_PARAMETERS (c)
|
||||
&& EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qswitch_frame))
|
||||
internal_last_event_frame = XCONS (XCONS (c)->cdr)->car;
|
||||
internal_last_event_frame = XCAR (XCDR (c));
|
||||
Vlast_event_frame = internal_last_event_frame;
|
||||
}
|
||||
}
|
||||
|
|
@ -2251,7 +2251,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
{
|
||||
Lisp_Object *tailp = &kb->kbd_queue;
|
||||
while (CONSP (*tailp))
|
||||
tailp = &XCONS (*tailp)->cdr;
|
||||
tailp = &XCDR (*tailp);
|
||||
if (!NILP (*tailp))
|
||||
abort ();
|
||||
*tailp = Fcons (c, Qnil);
|
||||
|
|
@ -2357,9 +2357,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
return just menu-bar for now. Modify the mouse click event
|
||||
so we won't do this twice, then queue it up. */
|
||||
if (EVENT_HAS_PARAMETERS (c)
|
||||
&& CONSP (XCONS (c)->cdr)
|
||||
&& CONSP (XCDR (c))
|
||||
&& CONSP (EVENT_START (c))
|
||||
&& CONSP (XCONS (EVENT_START (c))->cdr))
|
||||
&& CONSP (XCDR (EVENT_START (c))))
|
||||
{
|
||||
Lisp_Object posn;
|
||||
|
||||
|
|
@ -2483,9 +2483,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
goto retry;
|
||||
}
|
||||
/* It returned one event or more. */
|
||||
c = XCONS (tem)->car;
|
||||
c = XCAR (tem);
|
||||
Vunread_post_input_method_events
|
||||
= nconc2 (XCONS (tem)->cdr, Vunread_post_input_method_events);
|
||||
= nconc2 (XCDR (tem), Vunread_post_input_method_events);
|
||||
}
|
||||
|
||||
reread_first:
|
||||
|
|
@ -2612,8 +2612,8 @@ help_char_p (c)
|
|||
|
||||
if (EQ (c, Vhelp_char))
|
||||
return 1;
|
||||
for (tail = Vhelp_event_list; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
if (EQ (c, XCONS (tail)->car))
|
||||
for (tail = Vhelp_event_list; CONSP (tail); tail = XCDR (tail))
|
||||
if (EQ (c, XCAR (tail)))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2805,7 +2805,7 @@ event_to_kboard (event)
|
|||
Lisp_Object frame;
|
||||
frame = event->frame_or_window;
|
||||
if (CONSP (frame))
|
||||
frame = XCONS (frame)->car;
|
||||
frame = XCAR (frame);
|
||||
else if (WINDOWP (frame))
|
||||
frame = WINDOW_FRAME (XWINDOW (frame));
|
||||
|
||||
|
|
@ -3028,8 +3028,8 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
|
|||
if (CONSP (Vunread_command_events))
|
||||
{
|
||||
Lisp_Object first;
|
||||
first = XCONS (Vunread_command_events)->car;
|
||||
Vunread_command_events = XCONS (Vunread_command_events)->cdr;
|
||||
first = XCAR (Vunread_command_events);
|
||||
Vunread_command_events = XCDR (Vunread_command_events);
|
||||
*kbp = current_kboard;
|
||||
return first;
|
||||
}
|
||||
|
|
@ -3170,7 +3170,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
|
|||
|
||||
frame = event->frame_or_window;
|
||||
if (CONSP (frame))
|
||||
frame = XCONS (frame)->car;
|
||||
frame = XCAR (frame);
|
||||
else if (WINDOWP (frame))
|
||||
frame = WINDOW_FRAME (XWINDOW (frame));
|
||||
|
||||
|
|
@ -3197,8 +3197,8 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
|
|||
that as the `event with parameters' for this selection. */
|
||||
if ((event->kind == menu_bar_event
|
||||
|| event->kind == TOOL_BAR_EVENT)
|
||||
&& !(CONSP (obj) && EQ (XCONS (obj)->car, Qmenu_bar))
|
||||
&& !(CONSP (obj) && EQ (XCONS (obj)->car, Qtool_bar))
|
||||
&& !(CONSP (obj) && EQ (XCAR (obj), Qmenu_bar))
|
||||
&& !(CONSP (obj) && EQ (XCAR (obj), Qtool_bar))
|
||||
&& used_mouse_menu)
|
||||
*used_mouse_menu = 1;
|
||||
#endif
|
||||
|
|
@ -3350,11 +3350,11 @@ timer_start_idle ()
|
|||
EMACS_GET_TIME (timer_idleness_start_time);
|
||||
|
||||
/* Mark all idle-time timers as once again candidates for running. */
|
||||
for (timers = Vtimer_idle_list; CONSP (timers); timers = XCONS (timers)->cdr)
|
||||
for (timers = Vtimer_idle_list; CONSP (timers); timers = XCDR (timers))
|
||||
{
|
||||
Lisp_Object timer;
|
||||
|
||||
timer = XCONS (timers)->car;
|
||||
timer = XCAR (timers);
|
||||
|
||||
if (!VECTORP (timer) || XVECTOR (timer)->size != 8)
|
||||
continue;
|
||||
|
|
@ -3426,10 +3426,10 @@ timer_check (do_it_now)
|
|||
/* Skip past invalid timers and timers already handled. */
|
||||
if (!NILP (timers))
|
||||
{
|
||||
timer = XCONS (timers)->car;
|
||||
timer = XCAR (timers);
|
||||
if (!VECTORP (timer) || XVECTOR (timer)->size != 8)
|
||||
{
|
||||
timers = XCONS (timers)->cdr;
|
||||
timers = XCDR (timers);
|
||||
continue;
|
||||
}
|
||||
vector = XVECTOR (timer)->contents;
|
||||
|
|
@ -3438,16 +3438,16 @@ timer_check (do_it_now)
|
|||
|| !INTEGERP (vector[3])
|
||||
|| ! NILP (vector[0]))
|
||||
{
|
||||
timers = XCONS (timers)->cdr;
|
||||
timers = XCDR (timers);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (!NILP (idle_timers))
|
||||
{
|
||||
timer = XCONS (idle_timers)->car;
|
||||
timer = XCAR (idle_timers);
|
||||
if (!VECTORP (timer) || XVECTOR (timer)->size != 8)
|
||||
{
|
||||
idle_timers = XCONS (idle_timers)->cdr;
|
||||
idle_timers = XCDR (idle_timers);
|
||||
continue;
|
||||
}
|
||||
vector = XVECTOR (timer)->contents;
|
||||
|
|
@ -3456,7 +3456,7 @@ timer_check (do_it_now)
|
|||
|| !INTEGERP (vector[3])
|
||||
|| ! NILP (vector[0]))
|
||||
{
|
||||
idle_timers = XCONS (idle_timers)->cdr;
|
||||
idle_timers = XCDR (idle_timers);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -3467,7 +3467,7 @@ timer_check (do_it_now)
|
|||
this timer becomes ripe (negative if it's already ripe). */
|
||||
if (!NILP (timers))
|
||||
{
|
||||
timer = XCONS (timers)->car;
|
||||
timer = XCAR (timers);
|
||||
vector = XVECTOR (timer)->contents;
|
||||
EMACS_SET_SECS (timer_time,
|
||||
(XINT (vector[1]) << 16) | (XINT (vector[2])));
|
||||
|
|
@ -3479,7 +3479,7 @@ timer_check (do_it_now)
|
|||
based on the next idle timer. */
|
||||
if (!NILP (idle_timers))
|
||||
{
|
||||
idle_timer = XCONS (idle_timers)->car;
|
||||
idle_timer = XCAR (idle_timers);
|
||||
vector = XVECTOR (idle_timer)->contents;
|
||||
EMACS_SET_SECS (idle_timer_time,
|
||||
(XINT (vector[1]) << 16) | (XINT (vector[2])));
|
||||
|
|
@ -3498,26 +3498,26 @@ timer_check (do_it_now)
|
|||
if (EMACS_TIME_NEG_P (temp))
|
||||
{
|
||||
chosen_timer = timer;
|
||||
timers = XCONS (timers)->cdr;
|
||||
timers = XCDR (timers);
|
||||
difference = timer_difference;
|
||||
}
|
||||
else
|
||||
{
|
||||
chosen_timer = idle_timer;
|
||||
idle_timers = XCONS (idle_timers)->cdr;
|
||||
idle_timers = XCDR (idle_timers);
|
||||
difference = idle_timer_difference;
|
||||
}
|
||||
}
|
||||
else if (! NILP (timers))
|
||||
{
|
||||
chosen_timer = timer;
|
||||
timers = XCONS (timers)->cdr;
|
||||
timers = XCDR (timers);
|
||||
difference = timer_difference;
|
||||
}
|
||||
else
|
||||
{
|
||||
chosen_timer = idle_timer;
|
||||
idle_timers = XCONS (idle_timers)->cdr;
|
||||
idle_timers = XCDR (idle_timers);
|
||||
difference = idle_timer_difference;
|
||||
}
|
||||
vector = XVECTOR (chosen_timer)->contents;
|
||||
|
|
@ -4391,8 +4391,8 @@ make_lispy_event (event)
|
|||
Lisp_Object down;
|
||||
|
||||
down = Fnth (make_number (2), start_pos);
|
||||
if (EQ (event->x, XCONS (down)->car)
|
||||
&& EQ (event->y, XCONS (down)->cdr))
|
||||
if (EQ (event->x, XCAR (down))
|
||||
&& EQ (event->y, XCDR (down)))
|
||||
{
|
||||
event->modifiers |= click_modifier;
|
||||
}
|
||||
|
|
@ -4617,8 +4617,8 @@ make_lispy_event (event)
|
|||
if (! CONSP (event->frame_or_window))
|
||||
abort ();
|
||||
|
||||
f = XFRAME (XCONS (event->frame_or_window)->car);
|
||||
files = XCONS (event->frame_or_window)->cdr;
|
||||
f = XFRAME (XCAR (event->frame_or_window));
|
||||
files = XCDR (event->frame_or_window);
|
||||
|
||||
/* Ignore mouse events that were made on frames that
|
||||
have been deleted. */
|
||||
|
|
@ -4630,7 +4630,7 @@ make_lispy_event (event)
|
|||
|
||||
if (!WINDOWP (window))
|
||||
{
|
||||
window = XCONS (event->frame_or_window)->car;
|
||||
window = XCAR (event->frame_or_window);
|
||||
posn = Qnil;
|
||||
}
|
||||
else
|
||||
|
|
@ -4685,7 +4685,7 @@ make_lispy_event (event)
|
|||
/* The event value is in the cdr of the frame_or_window slot. */
|
||||
if (!CONSP (event->frame_or_window))
|
||||
abort ();
|
||||
return XCONS (event->frame_or_window)->cdr;
|
||||
return XCDR (event->frame_or_window);
|
||||
#endif
|
||||
|
||||
case TOOL_BAR_EVENT:
|
||||
|
|
@ -5049,7 +5049,7 @@ apply_modifiers (modifiers, base)
|
|||
entry = assq_no_quit (index, cache);
|
||||
|
||||
if (CONSP (entry))
|
||||
new_symbol = XCONS (entry)->cdr;
|
||||
new_symbol = XCDR (entry);
|
||||
else
|
||||
{
|
||||
/* We have to create the symbol ourselves. */
|
||||
|
|
@ -5107,8 +5107,8 @@ reorder_modifiers (symbol)
|
|||
Lisp_Object parsed;
|
||||
|
||||
parsed = parse_modifiers (symbol);
|
||||
return apply_modifiers ((int) XINT (XCONS (XCONS (parsed)->cdr)->car),
|
||||
XCONS (parsed)->car);
|
||||
return apply_modifiers ((int) XINT (XCAR (XCDR (parsed))),
|
||||
XCAR (parsed));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -5249,8 +5249,8 @@ has the same base event type and all the specified modifiers.")
|
|||
Lisp_Object elt;
|
||||
int this = 0;
|
||||
|
||||
elt = XCONS (rest)->car;
|
||||
rest = XCONS (rest)->cdr;
|
||||
elt = XCAR (rest);
|
||||
rest = XCDR (rest);
|
||||
|
||||
/* Given a symbol, see if it is a modifier name. */
|
||||
if (SYMBOLP (elt) && CONSP (rest))
|
||||
|
|
@ -5385,10 +5385,10 @@ lucid_event_type_list_p (object)
|
|||
if (! CONSP (object))
|
||||
return 0;
|
||||
|
||||
for (tail = object; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = object; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object elt;
|
||||
elt = XCONS (tail)->car;
|
||||
elt = XCAR (tail);
|
||||
if (! (INTEGERP (elt) || SYMBOLP (elt)))
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -5831,13 +5831,13 @@ menu_bar_items (old)
|
|||
|
||||
/* Move to the end those items that should be at the end. */
|
||||
|
||||
for (tail = Vmenu_bar_final_items; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = Vmenu_bar_final_items; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
int i;
|
||||
int end = menu_bar_items_index;
|
||||
|
||||
for (i = 0; i < end; i += 4)
|
||||
if (EQ (XCONS (tail)->car, XVECTOR (menu_bar_items_vector)->contents[i]))
|
||||
if (EQ (XCAR (tail), XVECTOR (menu_bar_items_vector)->contents[i]))
|
||||
{
|
||||
Lisp_Object tem0, tem1, tem2, tem3;
|
||||
/* Move the item at index I to the end,
|
||||
|
|
@ -5894,11 +5894,11 @@ menu_bar_one_keymap (keymap)
|
|||
menu_bar_one_keymap_changed_items = Qnil;
|
||||
|
||||
/* Loop over all keymap entries that have menu strings. */
|
||||
for (tail = keymap; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = keymap; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
item = XCONS (tail)->car;
|
||||
item = XCAR (tail);
|
||||
if (CONSP (item))
|
||||
menu_bar_item (XCONS (item)->car, XCONS (item)->cdr);
|
||||
menu_bar_item (XCAR (item), XCDR (item));
|
||||
else if (VECTORP (item))
|
||||
{
|
||||
/* Loop over the char values represented in the vector. */
|
||||
|
|
@ -6007,7 +6007,7 @@ menu_item_eval_property_1 (arg)
|
|||
{
|
||||
/* If we got a quit from within the menu computation,
|
||||
quit all the way out of it. This takes care of C-] in the debugger. */
|
||||
if (CONSP (arg) && EQ (XCONS (arg)->car, Qquit))
|
||||
if (CONSP (arg) && EQ (XCAR (arg), Qquit))
|
||||
Fsignal (Qquit, Qnil);
|
||||
|
||||
return Qnil;
|
||||
|
|
@ -6070,31 +6070,31 @@ parse_menu_item (item, notreal, inmenubar)
|
|||
/* Save the item here to protect it from GC. */
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_ITEM] = item;
|
||||
|
||||
item_string = XCONS (item)->car;
|
||||
item_string = XCAR (item);
|
||||
|
||||
start = item;
|
||||
item = XCONS (item)->cdr;
|
||||
item = XCDR (item);
|
||||
if (STRINGP (item_string))
|
||||
{
|
||||
/* Old format menu item. */
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME] = item_string;
|
||||
|
||||
/* Maybe help string. */
|
||||
if (CONSP (item) && STRINGP (XCONS (item)->car))
|
||||
if (CONSP (item) && STRINGP (XCAR (item)))
|
||||
{
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_HELP]
|
||||
= XCONS (item)->car;
|
||||
= XCAR (item);
|
||||
start = item;
|
||||
item = XCONS (item)->cdr;
|
||||
item = XCDR (item);
|
||||
}
|
||||
|
||||
/* Maybee key binding cache. */
|
||||
if (CONSP (item) && CONSP (XCONS (item)->car)
|
||||
&& (NILP (XCONS (XCONS (item)->car)->car)
|
||||
|| VECTORP (XCONS (XCONS (item)->car)->car)))
|
||||
if (CONSP (item) && CONSP (XCAR (item))
|
||||
&& (NILP (XCAR (XCAR (item)))
|
||||
|| VECTORP (XCAR (XCAR (item)))))
|
||||
{
|
||||
cachelist = XCONS (item)->car;
|
||||
item = XCONS (item)->cdr;
|
||||
cachelist = XCAR (item);
|
||||
item = XCDR (item);
|
||||
}
|
||||
|
||||
/* This is the real definition--the function to run. */
|
||||
|
|
@ -6112,47 +6112,47 @@ parse_menu_item (item, notreal, inmenubar)
|
|||
{
|
||||
/* New format menu item. */
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME]
|
||||
= XCONS (item)->car;
|
||||
start = XCONS (item)->cdr;
|
||||
= XCAR (item);
|
||||
start = XCDR (item);
|
||||
if (CONSP (start))
|
||||
{
|
||||
/* We have a real binding. */
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF]
|
||||
= XCONS (start)->car;
|
||||
= XCAR (start);
|
||||
|
||||
item = XCONS (start)->cdr;
|
||||
item = XCDR (start);
|
||||
/* Is there a cache list with key equivalences. */
|
||||
if (CONSP (item) && CONSP (XCONS (item)->car))
|
||||
if (CONSP (item) && CONSP (XCAR (item)))
|
||||
{
|
||||
cachelist = XCONS (item)->car;
|
||||
item = XCONS (item)->cdr;
|
||||
cachelist = XCAR (item);
|
||||
item = XCDR (item);
|
||||
}
|
||||
|
||||
/* Parse properties. */
|
||||
while (CONSP (item) && CONSP (XCONS (item)->cdr))
|
||||
while (CONSP (item) && CONSP (XCDR (item)))
|
||||
{
|
||||
tem = XCONS (item)->car;
|
||||
item = XCONS (item)->cdr;
|
||||
tem = XCAR (item);
|
||||
item = XCDR (item);
|
||||
|
||||
if (EQ (tem, QCenable))
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_ENABLE]
|
||||
= XCONS (item)->car;
|
||||
= XCAR (item);
|
||||
else if (EQ (tem, QCvisible) && !notreal)
|
||||
{
|
||||
/* If got a visible property and that evaluates to nil
|
||||
then ignore this item. */
|
||||
tem = menu_item_eval_property (XCONS (item)->car);
|
||||
tem = menu_item_eval_property (XCAR (item));
|
||||
if (NILP (tem))
|
||||
return 0;
|
||||
}
|
||||
else if (EQ (tem, QChelp))
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_HELP]
|
||||
= XCONS (item)->car;
|
||||
= XCAR (item);
|
||||
else if (EQ (tem, QCfilter))
|
||||
filter = item;
|
||||
else if (EQ (tem, QCkey_sequence))
|
||||
{
|
||||
tem = XCONS (item)->car;
|
||||
tem = XCAR (item);
|
||||
if (NILP (cachelist)
|
||||
&& (SYMBOLP (tem) || STRINGP (tem) || VECTORP (tem)))
|
||||
/* Be GC protected. Set keyhint to item instead of tem. */
|
||||
|
|
@ -6160,25 +6160,25 @@ parse_menu_item (item, notreal, inmenubar)
|
|||
}
|
||||
else if (EQ (tem, QCkeys))
|
||||
{
|
||||
tem = XCONS (item)->car;
|
||||
tem = XCAR (item);
|
||||
if (CONSP (tem) || (STRINGP (tem) && NILP (cachelist)))
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_KEYEQ]
|
||||
= tem;
|
||||
}
|
||||
else if (EQ (tem, QCbutton) && CONSP (XCONS (item)->car))
|
||||
else if (EQ (tem, QCbutton) && CONSP (XCAR (item)))
|
||||
{
|
||||
Lisp_Object type;
|
||||
tem = XCONS (item)->car;
|
||||
type = XCONS (tem)->car;
|
||||
tem = XCAR (item);
|
||||
type = XCAR (tem);
|
||||
if (EQ (type, QCtoggle) || EQ (type, QCradio))
|
||||
{
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_SELECTED]
|
||||
= XCONS (tem)->cdr;
|
||||
= XCDR (tem);
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_TYPE]
|
||||
= type;
|
||||
}
|
||||
}
|
||||
item = XCONS (item)->cdr;
|
||||
item = XCDR (item);
|
||||
}
|
||||
}
|
||||
else if (inmenubar || !NILP (start))
|
||||
|
|
@ -6202,7 +6202,7 @@ parse_menu_item (item, notreal, inmenubar)
|
|||
def = XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF];
|
||||
if (!NILP (filter))
|
||||
{
|
||||
def = menu_item_eval_property (list2 (XCONS (filter)->car,
|
||||
def = menu_item_eval_property (list2 (XCAR (filter),
|
||||
list2 (Qquote, def)));
|
||||
|
||||
XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF] = def;
|
||||
|
|
@ -6247,22 +6247,22 @@ parse_menu_item (item, notreal, inmenubar)
|
|||
{
|
||||
/* We have to create a cachelist. */
|
||||
CHECK_IMPURE (start);
|
||||
XCONS (start)->cdr = Fcons (Fcons (Qnil, Qnil), XCONS (start)->cdr);
|
||||
cachelist = XCONS (XCONS (start)->cdr)->car;
|
||||
XCDR (start) = Fcons (Fcons (Qnil, Qnil), XCDR (start));
|
||||
cachelist = XCAR (XCDR (start));
|
||||
newcache = 1;
|
||||
tem = XVECTOR (item_properties)->contents[ITEM_PROPERTY_KEYEQ];
|
||||
if (!NILP (keyhint))
|
||||
{
|
||||
XCONS (cachelist)->car = XCONS (keyhint)->car;
|
||||
XCAR (cachelist) = XCAR (keyhint);
|
||||
newcache = 0;
|
||||
}
|
||||
else if (STRINGP (tem))
|
||||
{
|
||||
XCONS (cachelist)->cdr = Fsubstitute_command_keys (tem);
|
||||
XCONS (cachelist)->car = Qt;
|
||||
XCDR (cachelist) = Fsubstitute_command_keys (tem);
|
||||
XCAR (cachelist) = Qt;
|
||||
}
|
||||
}
|
||||
tem = XCONS (cachelist)->car;
|
||||
tem = XCAR (cachelist);
|
||||
if (!EQ (tem, Qt))
|
||||
{
|
||||
int chkcache = 0;
|
||||
|
|
@ -6274,13 +6274,13 @@ parse_menu_item (item, notreal, inmenubar)
|
|||
prefix = XVECTOR (item_properties)->contents[ITEM_PROPERTY_KEYEQ];
|
||||
if (CONSP (prefix))
|
||||
{
|
||||
def = XCONS (prefix)->car;
|
||||
prefix = XCONS (prefix)->cdr;
|
||||
def = XCAR (prefix);
|
||||
prefix = XCDR (prefix);
|
||||
}
|
||||
else
|
||||
def = XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF];
|
||||
|
||||
if (NILP (XCONS (cachelist)->car)) /* Have no saved key. */
|
||||
if (NILP (XCAR (cachelist))) /* Have no saved key. */
|
||||
{
|
||||
if (newcache /* Always check first time. */
|
||||
/* Should we check everything when precomputing key
|
||||
|
|
@ -6314,16 +6314,16 @@ parse_menu_item (item, notreal, inmenubar)
|
|||
&& ! NILP (Fget (def, Qmenu_alias)))
|
||||
def = XSYMBOL (def)->function;
|
||||
tem = Fwhere_is_internal (def, Qnil, Qt, Qnil);
|
||||
XCONS (cachelist)->car = tem;
|
||||
XCAR (cachelist) = tem;
|
||||
if (NILP (tem))
|
||||
{
|
||||
XCONS (cachelist)->cdr = Qnil;
|
||||
XCDR (cachelist) = Qnil;
|
||||
chkcache = 0;
|
||||
}
|
||||
}
|
||||
else if (!NILP (keyhint) && !NILP (XCONS (cachelist)->car))
|
||||
else if (!NILP (keyhint) && !NILP (XCAR (cachelist)))
|
||||
{
|
||||
tem = XCONS (cachelist)->car;
|
||||
tem = XCAR (cachelist);
|
||||
chkcache = 1;
|
||||
}
|
||||
|
||||
|
|
@ -6333,20 +6333,20 @@ parse_menu_item (item, notreal, inmenubar)
|
|||
tem = Fkey_description (tem);
|
||||
if (CONSP (prefix))
|
||||
{
|
||||
if (STRINGP (XCONS (prefix)->car))
|
||||
tem = concat2 (XCONS (prefix)->car, tem);
|
||||
if (STRINGP (XCONS (prefix)->cdr))
|
||||
tem = concat2 (tem, XCONS (prefix)->cdr);
|
||||
if (STRINGP (XCAR (prefix)))
|
||||
tem = concat2 (XCAR (prefix), tem);
|
||||
if (STRINGP (XCDR (prefix)))
|
||||
tem = concat2 (tem, XCDR (prefix));
|
||||
}
|
||||
XCONS (cachelist)->cdr = tem;
|
||||
XCDR (cachelist) = tem;
|
||||
}
|
||||
}
|
||||
|
||||
tem = XCONS (cachelist)->cdr;
|
||||
tem = XCDR (cachelist);
|
||||
if (newcache && !NILP (tem))
|
||||
{
|
||||
tem = concat3 (build_string (" ("), tem, build_string (")"));
|
||||
XCONS (cachelist)->cdr = tem;
|
||||
XCDR (cachelist) = tem;
|
||||
}
|
||||
|
||||
/* If we only want to precompute equivalent key bindings, stop here. */
|
||||
|
|
@ -6483,7 +6483,7 @@ tool_bar_items (reuse, nitems)
|
|||
Lisp_Object tail;
|
||||
|
||||
/* KEYMAP is a list `(keymap (KEY . BINDING) ...)'. */
|
||||
for (tail = keymap; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
for (tail = keymap; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object keydef = XCAR (tail);
|
||||
if (CONSP (keydef))
|
||||
|
|
@ -6823,8 +6823,8 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
|
|||
/* If we got to this point via a mouse click,
|
||||
use a real menu for mouse selection. */
|
||||
if (EVENT_HAS_PARAMETERS (prev_event)
|
||||
&& !EQ (XCONS (prev_event)->car, Qmenu_bar)
|
||||
&& !EQ (XCONS (prev_event)->car, Qtool_bar))
|
||||
&& !EQ (XCAR (prev_event), Qmenu_bar)
|
||||
&& !EQ (XCAR (prev_event), Qtool_bar))
|
||||
{
|
||||
/* Display the menu and get the selection. */
|
||||
Lisp_Object *realmaps
|
||||
|
|
@ -6842,7 +6842,7 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
|
|||
{
|
||||
Lisp_Object tem;
|
||||
|
||||
record_menu_key (XCONS (value)->car);
|
||||
record_menu_key (XCAR (value));
|
||||
|
||||
/* If we got multiple events, unread all but
|
||||
the first.
|
||||
|
|
@ -6852,22 +6852,22 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
|
|||
to indicate that they came from a mouse menu,
|
||||
so that when present in last_nonmenu_event
|
||||
they won't confuse things. */
|
||||
for (tem = XCONS (value)->cdr; !NILP (tem);
|
||||
tem = XCONS (tem)->cdr)
|
||||
for (tem = XCDR (value); !NILP (tem);
|
||||
tem = XCDR (tem))
|
||||
{
|
||||
record_menu_key (XCONS (tem)->car);
|
||||
if (SYMBOLP (XCONS (tem)->car)
|
||||
|| INTEGERP (XCONS (tem)->car))
|
||||
XCONS (tem)->car
|
||||
= Fcons (XCONS (tem)->car, Qnil);
|
||||
record_menu_key (XCAR (tem));
|
||||
if (SYMBOLP (XCAR (tem))
|
||||
|| INTEGERP (XCAR (tem)))
|
||||
XCAR (tem)
|
||||
= Fcons (XCAR (tem), Qnil);
|
||||
}
|
||||
|
||||
/* If we got more than one event, put all but the first
|
||||
onto this list to be read later.
|
||||
Return just the first event now. */
|
||||
Vunread_command_events
|
||||
= nconc2 (XCONS (value)->cdr, Vunread_command_events);
|
||||
value = XCONS (value)->car;
|
||||
= nconc2 (XCDR (value), Vunread_command_events);
|
||||
value = XCAR (value);
|
||||
}
|
||||
else if (NILP (value))
|
||||
value = Qt;
|
||||
|
|
@ -7550,7 +7550,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
/* If the side queue is non-empty, ensure it begins with a
|
||||
switch-frame, so we'll replay it in the right context. */
|
||||
if (CONSP (interrupted_kboard->kbd_queue)
|
||||
&& (key = XCONS (interrupted_kboard->kbd_queue)->car,
|
||||
&& (key = XCAR (interrupted_kboard->kbd_queue),
|
||||
!(EVENT_HAS_PARAMETERS (key)
|
||||
&& EQ (EVENT_HEAD_KIND (EVENT_HEAD (key)),
|
||||
Qswitch_frame))))
|
||||
|
|
@ -7714,7 +7714,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
/* For a mouse click, get the local text-property keymap
|
||||
of the place clicked on, rather than point. */
|
||||
if (last_real_key_start == 0
|
||||
&& CONSP (XCONS (key)->cdr)
|
||||
&& CONSP (XCDR (key))
|
||||
&& ! localized_local_map)
|
||||
{
|
||||
Lisp_Object map_here, start, pos;
|
||||
|
|
@ -7722,7 +7722,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
localized_local_map = 1;
|
||||
start = EVENT_START (key);
|
||||
|
||||
if (CONSP (start) && CONSP (XCONS (start)->cdr))
|
||||
if (CONSP (start) && CONSP (XCDR (start)))
|
||||
{
|
||||
pos = POSN_BUFFER_POSN (start);
|
||||
if (INTEGERP (pos)
|
||||
|
|
@ -7780,9 +7780,9 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
goto replay_key;
|
||||
}
|
||||
}
|
||||
else if (CONSP (XCONS (key)->cdr)
|
||||
else if (CONSP (XCDR (key))
|
||||
&& CONSP (EVENT_START (key))
|
||||
&& CONSP (XCONS (EVENT_START (key))->cdr))
|
||||
&& CONSP (XCDR (EVENT_START (key))))
|
||||
{
|
||||
Lisp_Object posn;
|
||||
|
||||
|
|
@ -7847,7 +7847,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
int modifiers;
|
||||
|
||||
breakdown = parse_modifiers (head);
|
||||
modifiers = XINT (XCONS (XCONS (breakdown)->cdr)->car);
|
||||
modifiers = XINT (XCAR (XCDR (breakdown)));
|
||||
/* Attempt to reduce an unbound mouse event to a simpler
|
||||
event that is bound:
|
||||
Drags reduce to clicks.
|
||||
|
|
@ -7916,7 +7916,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
}
|
||||
|
||||
new_head
|
||||
= apply_modifiers (modifiers, XCONS (breakdown)->car);
|
||||
= apply_modifiers (modifiers, XCAR (breakdown));
|
||||
new_click
|
||||
= Fcons (new_head, Fcons (EVENT_START (key), Qnil));
|
||||
|
||||
|
|
@ -7999,7 +7999,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
/* Handle symbol with autoload definition. */
|
||||
if (SYMBOLP (fkey_next) && ! NILP (Ffboundp (fkey_next))
|
||||
&& CONSP (XSYMBOL (fkey_next)->function)
|
||||
&& EQ (XCONS (XSYMBOL (fkey_next)->function)->car, Qautoload))
|
||||
&& EQ (XCAR (XSYMBOL (fkey_next)->function), Qautoload))
|
||||
do_autoload (XSYMBOL (fkey_next)->function,
|
||||
fkey_next);
|
||||
|
||||
|
|
@ -8123,7 +8123,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
/* Handle symbol with autoload definition. */
|
||||
if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next))
|
||||
&& CONSP (XSYMBOL (keytran_next)->function)
|
||||
&& EQ (XCONS (XSYMBOL (keytran_next)->function)->car, Qautoload))
|
||||
&& EQ (XCAR (XSYMBOL (keytran_next)->function), Qautoload))
|
||||
do_autoload (XSYMBOL (keytran_next)->function,
|
||||
keytran_next);
|
||||
|
||||
|
|
@ -8259,7 +8259,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
int modifiers;
|
||||
|
||||
breakdown = parse_modifiers (key);
|
||||
modifiers = XINT (XCONS (XCONS (breakdown)->cdr)->car);
|
||||
modifiers = XINT (XCAR (XCDR (breakdown)));
|
||||
if (modifiers & shift_modifier)
|
||||
{
|
||||
Lisp_Object new_key;
|
||||
|
|
@ -8269,7 +8269,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
|
|||
|
||||
modifiers &= ~shift_modifier;
|
||||
new_key = apply_modifiers (modifiers,
|
||||
XCONS (breakdown)->car);
|
||||
XCAR (breakdown));
|
||||
|
||||
keybuf[t - 1] = new_key;
|
||||
mock_input = t;
|
||||
|
|
@ -8537,7 +8537,7 @@ a special event, so ignore the prefix argument and don't clear it.")
|
|||
{
|
||||
tem = Fnthcdr (Vhistory_length, Vcommand_history);
|
||||
if (CONSP (tem))
|
||||
XCONS (tem)->cdr = Qnil;
|
||||
XCDR (tem) = Qnil;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -8580,14 +8580,14 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
|
|||
|
||||
if (EQ (prefixarg, Qminus))
|
||||
strcpy (buf, "- ");
|
||||
else if (CONSP (prefixarg) && XINT (XCONS (prefixarg)->car) == 4)
|
||||
else if (CONSP (prefixarg) && XINT (XCAR (prefixarg)) == 4)
|
||||
strcpy (buf, "C-u ");
|
||||
else if (CONSP (prefixarg) && INTEGERP (XCONS (prefixarg)->car))
|
||||
else if (CONSP (prefixarg) && INTEGERP (XCAR (prefixarg)))
|
||||
{
|
||||
if (sizeof (int) == sizeof (EMACS_INT))
|
||||
sprintf (buf, "%d ", XINT (XCONS (prefixarg)->car));
|
||||
sprintf (buf, "%d ", XINT (XCAR (prefixarg)));
|
||||
else if (sizeof (long) == sizeof (EMACS_INT))
|
||||
sprintf (buf, "%ld ", (long) XINT (XCONS (prefixarg)->car));
|
||||
sprintf (buf, "%ld ", (long) XINT (XCAR (prefixarg)));
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -360,11 +360,11 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
|
|||
|
||||
for (buf_list = Vbuffer_alist;
|
||||
CONSP (buf_list);
|
||||
buf_list = XCONS (buf_list)->cdr)
|
||||
buf_list = XCDR (buf_list))
|
||||
{
|
||||
Lisp_Object other_buf;
|
||||
|
||||
other_buf = XCONS (XCONS (buf_list)->car)->cdr;
|
||||
other_buf = XCDR (XCAR (buf_list));
|
||||
if (STRINGP (XBUFFER (other_buf)->directory))
|
||||
{
|
||||
current_buffer->directory = XBUFFER (other_buf)->directory;
|
||||
|
|
@ -565,7 +565,7 @@ get_minibuffer (depth)
|
|||
enabled in it. */
|
||||
Fbuffer_enable_undo (buf);
|
||||
|
||||
XCONS (tail)->car = buf;
|
||||
XCAR (tail) = buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1026,9 +1026,9 @@ or the symbol from the obarray.")
|
|||
|
||||
/* Ignore this element if it fails to match all the regexps. */
|
||||
for (regexps = Vcompletion_regexp_list; CONSP (regexps);
|
||||
regexps = XCONS (regexps)->cdr)
|
||||
regexps = XCDR (regexps))
|
||||
{
|
||||
tem = Fstring_match (XCONS (regexps)->car, eltstring, zero);
|
||||
tem = Fstring_match (XCAR (regexps), eltstring, zero);
|
||||
if (NILP (tem))
|
||||
break;
|
||||
}
|
||||
|
|
@ -1280,9 +1280,9 @@ are ignored unless STRING itself starts with a space.")
|
|||
|
||||
/* Ignore this element if it fails to match all the regexps. */
|
||||
for (regexps = Vcompletion_regexp_list; CONSP (regexps);
|
||||
regexps = XCONS (regexps)->cdr)
|
||||
regexps = XCDR (regexps))
|
||||
{
|
||||
tem = Fstring_match (XCONS (regexps)->car, eltstring, zero);
|
||||
tem = Fstring_match (XCAR (regexps), eltstring, zero);
|
||||
if (NILP (tem))
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4836,13 +4836,13 @@ A nil width parameter means no margin.")
|
|||
/* Check widths < 0 and translate a zero width to nil.
|
||||
Margins that are too wide have to be checked elsewhere. */
|
||||
if ((INTEGERP (left) && XINT (left) < 0)
|
||||
|| (FLOATP (left) && XFLOAT (left)->data <= 0))
|
||||
|| (FLOATP (left) && XFLOAT_DATA (left) <= 0))
|
||||
XSETFASTINT (left, 0);
|
||||
if (INTEGERP (left) && XFASTINT (left) == 0)
|
||||
left = Qnil;
|
||||
|
||||
if ((INTEGERP (right) && XINT (right) < 0)
|
||||
|| (FLOATP (right) && XFLOAT (right)->data <= 0))
|
||||
|| (FLOATP (right) && XFLOAT_DATA (right) <= 0))
|
||||
XSETFASTINT (right, 0);
|
||||
if (INTEGERP (right) && XFASTINT (right) == 0)
|
||||
right = Qnil;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue