From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#26428: 24.5; (elisp) Extended Menu Items: document same features for menus Date: Sat, 12 Dec 2020 14:01:38 -0800 (PST) Message-ID: <0c41efdb-437f-4f41-85b2-6f28a3d80c66@default> References: <87eeju953d.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35391"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 26428@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 12 23:02:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koCxw-00095x-GC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Dec 2020 23:02:12 +0100 Original-Received: from localhost ([::1]:60444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koCxv-0000AN-CX for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Dec 2020 17:02:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koCxm-0000A3-JY for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2020 17:02:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koCxm-0002t7-C5 for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2020 17:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koCxm-0008S7-9Q for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2020 17:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Dec 2020 22:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26428 X-GNU-PR-Package: emacs Original-Received: via spool by 26428-submit@debbugs.gnu.org id=B26428.160781051232472 (code B ref 26428); Sat, 12 Dec 2020 22:02:02 +0000 Original-Received: (at 26428) by debbugs.gnu.org; 12 Dec 2020 22:01:52 +0000 Original-Received: from localhost ([127.0.0.1]:47011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koCxc-0008Rg-2I for submit@debbugs.gnu.org; Sat, 12 Dec 2020 17:01:52 -0500 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:53922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koCxZ-0008RO-JC for 26428@debbugs.gnu.org; Sat, 12 Dec 2020 17:01:50 -0500 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BCM13Nv177778; Sat, 12 Dec 2020 22:01:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=/sV6r4vy4s9jDN77Xuqq8rig9UqoumZTc9ZPXZQAJpU=; b=ewm0faT/5D8Xwe+6dF1oKlWN7C5SMAYzne5PK6yBl9WtpXuJpe7uZKIAgtNBWkA7yzR0 7OgBDcH1d93oLz5CrfTbr6AhBaZ3qjnezJ6c7pBgdxBMq4AFNkvfNXhlNITjrlFpvY/y fr8MQFdBO/wTgojjbJ+UQSpsOl1LuKIN13zvxqJwQLc/IYYAZfgFgq6fG9/cW7e7uxtg wE91bMh9wydh7TYiYjEOFr5qX6H9mLYUXD66cAHQCiILdRMggjTqyEpsnhCfw6ALlYy2 QfPBJOVESnJHsZ5SJ2uu8YeCZA+It8dRXvgX1uS9V1Q0tZYjJg3PkQn1RZWTAOcfYKS0 3w== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2130.oracle.com with ESMTP id 35ckcb1fjs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 12 Dec 2020 22:01:42 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BCM0hNp137224; Sat, 12 Dec 2020 22:01:42 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 35cnp01r75-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 12 Dec 2020 22:01:42 +0000 Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0BCM1dLE032461; Sat, 12 Dec 2020 22:01:41 GMT In-Reply-To: <87eeju953d.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5071.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9833 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 adultscore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012120172 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9833 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 clxscore=1011 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012120172 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195917 Archived-At: > Could you suggest a text for the manual to document this? Doing this quickly. Modify as you see fit. In node `Extended Menu Items' we say: To define a real menu item which can be selected, the extended format binding looks like this: (menu-item ITEM-NAME REAL-BINDING . ITEM-PROPERTY-LIST) Here, ITEM-NAME is an expression which evaluates to the menu item string. Thus, the string need not be a constant. The third element, REAL-BINDING, is the command to execute. The tail of the list, ITEM-PROPERTY-LIST, has the form of a property list which contains other information. The last paragraph could be changed to indicate that REAL-BINDING can be a command or a menu keymap (but not a keymap-variable symbol). Something like this perhaps: Here, ITEM-NAME is an expression which evaluates to the menu item string. Thus, the string need not be a constant. The third element, REAL-BINDING, is the command to execute or a menu keymap (but not a keymap-variable symbol). If it is a menu keymap, that is, a keymap that has a prompt string, then ITEM-NAME is the name that appears for the submenu in its parent menu. =20 The tail of the list, ITEM-PROPERTY-LIST, has the form of a property list that contains other information. If you don't think that's clear enough (I do) then you can add an example such as what I provided in the bug report. One thing I'm not clear on (haven't investigated): I'm guessing that the keymap you provide here needs to be a menu keymap, that is, a keymap with a prompt string. Dunno whether that's true. If not, remove mention of that. Whether that's actually needed or just possible, when it happens what's the relation between the prompt string and ITEM-NAME? I'm guessing that ITEM-NAME is used for the submenu name that appears, and the prompt string is not used in this context.