emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limit what M-x TAB lists?


From: Lars Ingebrigtsen
Subject: Re: Limit what M-x TAB lists?
Date: Thu, 26 Dec 2013 19:03:39 +0100
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]