From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Need a predicate to tell whether a command was invoked from the menu-bar Date: Tue, 28 Jun 2016 14:18:42 -0700 (PDT) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1467148766 8357 80.91.229.3 (28 Jun 2016 21:19:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2016 21:19:26 +0000 (UTC) To: rswgnu@gmail.com, emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 23:19:10 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bI0PS-0004KU-Gj for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2016 23:19:06 +0200 Original-Received: from localhost ([::1]:39983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bI0PR-0002qi-Ep for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2016 17:19:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bI0PH-0002pR-Tr for emacs-devel@gnu.org; Tue, 28 Jun 2016 17:18:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bI0PD-0003cX-QF for emacs-devel@gnu.org; Tue, 28 Jun 2016 17:18:54 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:51347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bI0PD-0003cJ-GT for emacs-devel@gnu.org; Tue, 28 Jun 2016 17:18:51 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u5SLIkND031651 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Jun 2016 21:18:47 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u5SLIk9w030700 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Jun 2016 21:18:46 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u5SLIiQ7015539; Tue, 28 Jun 2016 21:18:45 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204904 Archived-At: > Does anyone have a predicate function that determines whether or not > a command was invoked from a menu-bar menu? I use this: (and (> (length (this-command-keys-vector)) 0) (equal '(menu-bar) (elt (this-command-keys-vector) 0)) ;; Exclude uninterned symbols such as `menu-function-356'. (symbolp this-command) (intern-soft this-command)) (But please consider using plain-text mail, not HTML, for this mailing list.)