emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What is the purpose of this code in xterm.c ?


From: Kim F. Storm
Subject: What is the purpose of this code in xterm.c ?
Date: 06 Dec 2003 00:15:32 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

The following lines (marked with ???) look superfluous.

They obviously set `f' if it's not already set on entry.
But `f' isn't used in the call to show_help_echo.

Can anyone explain what they are supposed to do?


/* Function that finds the frame for WIDGET and shows the HELP text
   for that widget.
   F is the frame if known, or NULL if not known.  */
static void
show_help_event (f, widget, help)
     FRAME_PTR f;
     xt_or_gtk_widget widget;
     Lisp_Object help;
{
  Lisp_Object frame;

  if (f)
    {
      XSETFRAME (frame, f);
      kbd_buffer_store_help_event (frame, help);
    }
  else
    {
???      /* WIDGET is the popup menu.  It's parent is the frame's
???      widget.  See which frame that is.  */
???      xt_or_gtk_widget frame_widget = XtParent (widget);
???      Lisp_Object tail;
???
???      for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail))
???     {
???       frame = XCAR (tail);
???       if (GC_FRAMEP (frame)
???           && (f = XFRAME (frame),
???               FRAME_X_P (f) && f->output_data.x->widget == frame_widget))
???         break;
???     }

      show_help_echo (help, Qnil, Qnil, Qnil, 1);
    }
}

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]