From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: describe-buffer-bindings and menu-items with :prefix Date: Wed, 15 Jan 2020 12:26:13 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao:159.69.161.202"; logging-data="64441"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel To: yyoncho Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 15 18:26:57 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1irmRV-000GZF-EQ for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Jan 2020 18:26:57 +0100 Original-Received: from localhost ([::1]:58048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irmRU-0002Jh-G6 for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Jan 2020 12:26:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44858) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irmQw-0001dd-CH for emacs-devel@gnu.org; Wed, 15 Jan 2020 12:26:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irmQv-0004ei-0K for emacs-devel@gnu.org; Wed, 15 Jan 2020 12:26:21 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3520) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1irmQu-0004e0-QB for emacs-devel@gnu.org; Wed, 15 Jan 2020 12:26:20 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3CA44101888; Wed, 15 Jan 2020 12:26:19 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B2474100A09; Wed, 15 Jan 2020 12:26:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1579109177; bh=9i0CubryyGr6x0EOcs1HnR7KqDIg3xm/6EXSAxN1BNk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Tq6ksJKI9UDhvGadGbTLTy6vk/4VT7Z32YNXRAWRpws9CWEjgFRtokAo7kI8dNeDQ Tsl+0ryylVeUK2H/eK0UQn8RsS/xfazpeBBX/rbR2DW6JYtLverDhKcoXj/jGQ/0eL OENibVMIrnL74HIbGgnFbXEdyOE5LQkxSmpDfOd7RlMOs/3OrwCLfgQt8CsoXz4CGM llXegl3XgIBI+8ZgnHqCBiHro9oYu7DDz7AFubT9HM4p148XEPImVTWD+GQSQkVAy/ i4ktUSm2IHKNLftRZWnjP5J3oy2pRXth+MGGiFSygbV00jWPYhWC/1M3LgOTUwaGOG 2tRpL7328aQYg== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 69490120772; Wed, 15 Jan 2020 12:26:17 -0500 (EST) In-Reply-To: (yyoncho@gmail.com's message of "Wed, 15 Jan 2020 16:25:09 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244277 Archived-At: > (define-key global-map (kbd "C-c C-l r X") '(menu-item "2" :filter (lambda (&rest _) > (lambda () > (interactive) > (message "Called"))))) This is a broken `menu-item`: the `:filter` above is not treated as a keyword argument but as "the command". You should use something like: (define-key global-map (kbd "C-c C-l r X") `(menu-item "2" ,(lambda () (interactive) (message "Called")) :filter ,(lambda (cmd) cmd))) [ of course, I assume you'll use a more interesting filter than the identity function. ] Stefan