emacs-devel
[Top][All Lists]
Advanced

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

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


From: Jan D.
Subject: Re: What is the purpose of this code in xterm.c ?
Date: Fri, 5 Dec 2003 23:46:34 +0100

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


I guess you mean xmenu.c.
Indeed they do.  My guess is that previously kbd_buffer_store_help_event
was used there also.

But I suspect that function is never called with f == NULL.

        Jan D.


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



_______________________________________________
Emacs-devel mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/emacs-devel





reply via email to

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