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)"
'interactive)
m-x.el
Description: Binary data
_______________________________________________ gnu-emacs-sources mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
