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: Sun, 26 Feb 2006 10:55:05 -0500 Message-ID: <878xryp1bi.fsf-monnier+emacs@gnu.org> References: <44010776.6020804@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1140996113 19955 80.91.229.2 (26 Feb 2006 23:21:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Feb 2006 23:21:53 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 27 00:21:50 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 1FDVD0-0005nY-Cb for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2006 00:21:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FDVD4-0000iO-6r for ged-emacs-devel@m.gmane.org; Sun, 26 Feb 2006 18:21:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FDOJ8-0003dV-DT for emacs-devel@gnu.org; Sun, 26 Feb 2006 10:59:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FDOEw-00026I-CG for emacs-devel@gnu.org; Sun, 26 Feb 2006 10:59:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FDOEr-00024O-Ea for emacs-devel@gnu.org; Sun, 26 Feb 2006 10:55:14 -0500 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FDOFM-0000eD-PX for emacs-devel@gnu.org; Sun, 26 Feb 2006 10:55:44 -0500 Original-Received: from alfajor ([70.48.80.201]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060226155506.UVFS13653.tomts36-srv.bellnexxia.net@alfajor>; Sun, 26 Feb 2006 10:55:06 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id D36C7D7422; Sun, 26 Feb 2006 10:55:05 -0500 (EST) Original-To: Lennart Borgman In-Reply-To: <44010776.6020804@student.lu.se> (Lennart Borgman's message of "Sun, 26 Feb 2006 02:42:14 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:50998 Archived-At: > I think at least for me it is impossible to understand from the > documentation when :enable and :filter in a menu-item list is > computed. I believe the documentation should be improved. > From my simple tests is seems like the argument to :filter is computed > every time the menubar is accessed. It is not really what I would expect > when this is in a submenu. Is this behaviour intentional? Depends what you mean by "intentional". When the menubar is accessed, the whole menu tree is computed before handing it to the toolkit: submenus are precomputed rather than being computed on the fly when the user actually accesses them. > The same seems to be true for the argument to :enable. Is this intentional? Same thing. 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), but nobody's worked on changing it. Note that in most cases this only matters for reasons of performance. Stefan