From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Extended menu items, when are :enable and :filter computed? Date: Mon, 27 Feb 2006 16:49:26 -0500 Message-ID: References: <44010776.6020804@student.lu.se> <878xryp1bi.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1141400562 23332 80.91.229.2 (3 Mar 2006 15:42:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 3 Mar 2006 15:42:42 +0000 (UTC) Cc: lennart.borgman.073@student.lu.se, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 03 16:42:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FFCPy-0007Yy-EZ for ged-emacs-devel@m.gmane.org; Fri, 03 Mar 2006 16:42:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FFCPy-0004Fk-K5 for ged-emacs-devel@m.gmane.org; Fri, 03 Mar 2006 10:42:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FEeB0-0006YX-96 for emacs-devel@gnu.org; Wed, 01 Mar 2006 22:08:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FEeAo-0006WL-Mf for emacs-devel@gnu.org; Wed, 01 Mar 2006 22:08:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FEApA-0007Li-Uv for emacs-devel@gnu.org; Tue, 28 Feb 2006 14:47:57 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FDqGB-0005o7-4o; Mon, 27 Feb 2006 16:50:27 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 8523333E607; Mon, 27 Feb 2006 16:49:31 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id CD01D47C1; Mon, 27 Feb 2006 16:49:26 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id B1A0171524; Mon, 27 Feb 2006 16:49:26 -0500 (EST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Mon, 27 Feb 2006 14:02:45 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51061 Archived-At: > I don't think this is considered as a feature (and I thought it was in > the TODO list to change it so that submenus are only constructed when > needed, but I can't seem to find it in the TODO file), > The reason for precomputing all the submenus is so that the toolkit > can display them all autonomously. I think that's the only way some > toolkits can do it, so the idea of changing this is a non-starter. If the only toolkits which could do it are non-free or "insignificant", then I agree, but otherwise it may still make sense to provide it as a toolkit-dependent optimization. But indeed, it means that even if we manage to change it for some toolkits, you won't be able to rely on your :filters and :enables being called only when strictly necessary. I've always viewed such a change as a performance improvement for those cases where we use large dynamically-generated menus or menus with lots of shortcuts to compute (X-Symbol comes to mind). AFAIK XEmacs does compute menus on-demand. Stefan