From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: How to tell if a command was called from a menu? Date: 17 Aug 2009 08:52:34 GMT Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250502094 887 80.91.229.12 (17 Aug 2009 09:41:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Aug 2009 09:41:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 17 11:41:27 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1McyiT-0001K7-0R for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Aug 2009 11:41:25 +0200 Original-Received: from localhost ([127.0.0.1]:57026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McyiS-0006d2-9q for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Aug 2009 05:41:24 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 15 Original-X-Trace: individual.net lzvhI2tlGjuWdntBQIxomgwYHkBeH9TS7lJBRJmQ98laAVE8MK Cancel-Lock: sha1:Zyv0xHJ/46PbkIZUpoqLuj/Vj6w= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/0.9.9 (Linux) Original-Xref: news.stanford.edu gnu.emacs.help:172050 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67221 Archived-At: Lennart Borgman wrote: > I believe you can do it the same way it is done in > ourcomments-M-x-menu-mode. It is in the file ourcomments-util.el in > nXhtml repository. cool, thanks! i had found (member 'menu-bar last-nonmenu-event) myself, but i suspect your way is better. (in fact, judging by the documentation, i think last-nonmenu-event should be nil when a command is called from a menu, but instead it seems to have the value (menu-bar)...) -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)