From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: What is the purpose of this code in xterm.c ? Date: Fri, 5 Dec 2003 23:46:34 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v553) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1070664632 16678 80.91.224.253 (5 Dec 2003 22:50:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Dec 2003 22:50:32 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Dec 05 23:50:30 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ASOmM-0005sx-00 for ; Fri, 05 Dec 2003 23:50:30 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ASOmL-0004Ve-00 for ; Fri, 05 Dec 2003 23:50:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ASPjG-0006Fp-Kk for emacs-devel@quimby.gnus.org; Fri, 05 Dec 2003 18:51:22 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ASPib-00068D-Ux for emacs-devel@gnu.org; Fri, 05 Dec 2003 18:50:41 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ASPi5-00061p-T3 for emacs-devel@gnu.org; Fri, 05 Dec 2003 18:50:40 -0500 Original-Received: from [213.115.192.53] (helo=mail2.norrnet.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ASPgk-0005nb-Ia for emacs-devel@gnu.org; Fri, 05 Dec 2003 18:48:46 -0500 Original-Received: from stubby.bodenonline.com (stubby.bodenonline.com [193.201.16.94]) by mail2.norrnet.net (BorderWare MXtreme Mail Firewall) with ESMTP id 21D95BCC6F; Fri, 5 Dec 2003 23:46:57 +0100 (CET) Original-Received: from accessno42.bodenonline.com (accessno42.bodenonline.com [193.201.16.44]) by stubby.bodenonline.com (8.12.1/8.12.1) with ESMTP id hB5NdbYr016843; Sat, 6 Dec 2003 00:39:38 +0100 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: X-Mailer: Apple Mail (2.553) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18443 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18443 > 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 http://www.cua.dk > > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://mail.gnu.org/mailman/listinfo/emacs-devel