[Top][All Lists]

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

M-x in Lisp

From: Aaron S. Hawley
Subject: M-x in Lisp
Date: Wed, 21 Mar 2012 09:49:25 -0400

M-x or `execute-extended-command' is a C primitive.  Here's a Lisp
version that works *only* in the Emacs 24 pretest.  I've purposely
cargo culted the original C version, including carrying over the
comments.  I've been using using and maintaining this code since 2008
and haven't had any issues.  After 24.1 is released (any day now), I'm
hoping to contribute it back so it can be included in a future release
of Emacs (24.2, 25.1?).  Send me comments off-list if you come across
any issues with using it.

Install by putting the following snippet in your .emacs, and putting
the library m-x.el (attached) in your load-path.

(unless (fboundp 'primitive-execute-extended-command)
  (fset 'primitive-execute-extended-command
        (symbol-function 'execute-extended-command)))
(defalias 'execute-extended-command 'ash-execute-extended-command)

(autoload 'ash-execute-extended-command "m-x"
  "Read function name, then read its arguments and call it.

\(fn prefixarg)"

Attachment: m-x.el
Description: Binary data

reply via email to

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