* What is the purpose of this code in xterm.c ?
@ 2003-12-05 23:15 Kim F. Storm
2003-12-05 22:46 ` Jan D.
0 siblings, 1 reply; 2+ messages in thread
From: Kim F. Storm @ 2003-12-05 23:15 UTC (permalink / raw)
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 <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: What is the purpose of this code in xterm.c ?
2003-12-05 23:15 What is the purpose of this code in xterm.c ? Kim F. Storm
@ 2003-12-05 22:46 ` Jan D.
0 siblings, 0 replies; 2+ messages in thread
From: Jan D. @ 2003-12-05 22:46 UTC (permalink / raw)
Cc: emacs-devel
> 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 <storm@cua.dk> http://www.cua.dk
>
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-12-05 23:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-05 23:15 What is the purpose of this code in xterm.c ? Kim F. Storm
2003-12-05 22:46 ` Jan D.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.