From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Limit what M-x TAB lists? Date: Thu, 26 Dec 2013 19:03:39 +0100 Message-ID: <87sitfcww4.fsf@building.gnus.org> References: <87bo03itkn.fsf@building.gnus.org> <87wqirhbyw.fsf@building.gnus.org> <87mwjn7g75.fsf@wanadoo.es> <877garh9v6.fsf@building.gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1388081403 32329 80.91.229.3 (26 Dec 2013 18:10:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Dec 2013 18:10:03 +0000 (UTC) Cc: =?iso-8859-1?Q?=D3scar?= Fuentes , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 26 19:10:09 2013 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 1VwFNn-0002sK-5k for ged-emacs-devel@m.gmane.org; Thu, 26 Dec 2013 19:10:07 +0100 Original-Received: from localhost ([::1]:46524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwFNm-0004r7-Lv for ged-emacs-devel@m.gmane.org; Thu, 26 Dec 2013 13:10:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwFNe-0004pU-Uk for emacs-devel@gnu.org; Thu, 26 Dec 2013 13:10:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwFNZ-000074-Gy for emacs-devel@gnu.org; Thu, 26 Dec 2013 13:09:58 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:44223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwFNZ-00006t-9z for emacs-devel@gnu.org; Thu, 26 Dec 2013 13:09:53 -0500 Original-Received: from 2.148.235.122.tmi.telenormobil.no ([2.148.235.122] helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1VwFNK-0005gT-Jm; Thu, 26 Dec 2013 19:09:38 +0100 In-Reply-To: (Stefan Monnier's message of "Thu, 26 Dec 2013 12:50:51 -0500") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-MailScanner-ID: 1VwFNK-0005gT-Jm MailScanner-NULL-Check: 1388686179.07026@JNnUQd0t3ahxwTlDzQm9IA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166900 Archived-At: Stefan Monnier writes: >> (unless (fboundp 'command) >> (defmacro command (&rest args) >> `(interactive ,@(cdr args)))) > > I suspect it wouldn't work. It seemed to work for me. I put the following in an .el file: (unless (fboundp 'command) (defmacro command (&rest args) `(interactive ,@(cdr args)))) (defun foo (arg) (command 'bar "p") (message "%s" arg)) and byte-compiled it and loaded it in a new Emacs. `C-u 4 M-x foo' said "4"... But perhaps there are other subtle things that don't work? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/