/* Generic frame functions.
- Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation.
+ Copyright (C) 1993, 1994, 1995, 1997, 1999 Free Software Foundation.
This file is part of GNU Emacs.
#include <config.h>
#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
#include "lisp.h"
#include "charset.h"
#ifdef HAVE_X_WINDOWS
/* 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,
{
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 */
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)))
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 ();
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. */
#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
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,
}
do_switch_frame (frame1, Qnil, 0);
+ sf = SELECTED_FRAME ();
}
/* Don't allow minibuf_window to remain on a deleted frame. */
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;
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);
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);
{
char *end_ptr;
+ strtol (str + 1, &end_ptr, 10);
+
if (end_ptr == str + len)
return 1;
}