From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pavel@Janik.cz (Pavel =?iso-8859-2?q?Jan=EDk?=) Newsgroups: gmane.emacs.devel Subject: Re: C-l while in menu? Date: Sat, 11 May 2002 10:53:30 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200204072343.g37NhIC20114@aztec.santafe.edu> <200204201727.g3KHRD401381@aztec.santafe.edu> <86sn5pe1xs.fsf@gerd.dnsq.org> <200205100029.g4A0TqS06473@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1021110124 16579 127.0.0.1 (11 May 2002 09:42:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 11 May 2002 09:42:04 +0000 (UTC) Cc: gerd@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 176TO8-0004JI-00 for ; Sat, 11 May 2002 11:42:04 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 176TXe-0003xE-00 for ; Sat, 11 May 2002 11:51:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 176TOB-0007hy-00; Sat, 11 May 2002 05:42:07 -0400 Original-Received: from p0351.as-l043.contactel.cz ([194.108.243.97] helo=SnowWhite.SuSE.cz) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 176TLM-0007JH-00; Sat, 11 May 2002 05:39:13 -0400 Original-Received: by SnowWhite.SuSE.cz (PJ, from userid 500) id 7662F18C92; Sat, 11 May 2002 11:41:49 +0200 (CEST) Original-To: rms@gnu.org X-Face: $"d&^B_IKlTHX!y2d,3;grhwjOBqOli]LV`6d]58%5'x/kBd7.MO&n3bJ@Zkf&RfBu|^qL+ ?/Re{MpTqanXS2'~Qp'J2p^M7uM:zp[1Xq#{|C!*'&NvCC[9!|=>#qHqIhroq_S"MH8nSH+d^9*BF: iHiAs(t(~b#1.{w.d[=Z In-Reply-To: <200205100029.g4A0TqS06473@aztec.santafe.edu> (Richard Stallman's message of "Thu, 9 May 2002 18:29:52 -0600 (MDT)") User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.50 (i386-suse-linux-gnu) Original-Lines: 79 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3837 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3837 From: Richard Stallman Date: Thu, 9 May 2002 18:29:52 -0600 (MDT) > That might be a bug in LessTif. It might be correct behavior. > I don't know which. >=20 > Anyway, you can change the code to cope with it. How about if you > change the code so it adds 1 when a menu item is activated and > substracts 1 when a menu item is deactivated? Does it work then? I already did this: --- cut here --- From: Pavel@janik.cz (Pavel Jan=EDk) Subject: Re: C-l while in menu? To: Richard Stallman Cc: Gerd Moellmann Cc: emacs-devel@gnu.org Date: Sat, 20 Apr 2002 23:06:44 +0200 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-= gnu) From: Richard Stallman Date: Sat, 20 Apr 2002 11:27:13 -0600 (MDT) > Can you see what is required to make this feature work with LessTif to= o? > If you can't figure out from the docs what needs doing, > perhaps toshok@hungry.com could give you advice. Well, it almost works. Current CVS just process only the first key, because popup_activated_flag is 1 only at that moment. After the first key is processed, popup_deactivate_callback is called (many times) and that variable is zeroed. And from now on, key in menu are no longer processed. Good. After: --- /home/pavel/.Emacs/Work/emacs/src/xmenu.c Mon Jan 7 06:48:44 2002 +++ ./xmenu.c Sat Apr 20 21:54:41 2002 @@ -1154,7 +1154,7 @@ LWLIB_ID id; XtPointer client_data; { - popup_activated_flag =3D 1; + popup_activated_flag +=3D 1; } =20 /* This callback is invoked when a dialog or menu is finished being @@ -1166,7 +1166,7 @@ LWLIB_ID id; XtPointer client_data; { - popup_activated_flag =3D 0; + popup_activated_flag -=3D 1; } =20 /* Lwlib callback called when menu items are highlighted/unhighlighted Menu works, because popup_activated_flag is going to negative numbers very fast... But I can no longer enter any character in the buffer, because those keypress events are processed in menu... So I think it is not about Lesstif knowledge, it is about how Lesstif is used in Emacs. I do not use Lesstif so perhaps Gerd can help me. Or anyone else? --- cut here --- > If they don't always balance out to zero, maybe it needs to keep track > of which ones have been activated and see if all of them have since > been deactivated. >=20 > If that doesn't work, then I am pretty sure it is a bug in LessTif. I'll wait for a reply from Lesstif people. --=20 Pavel Jan=EDk No matter how hard you try, you can't make a baby in much less than 9 months. Trying to speed this up *might* make it slower, but it won't make it happen any quicker. -- RFC1925: The Twelve Networking Truths