help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How does M-x completion works


From: Kevin Rodgers
Subject: Re: How does M-x completion works
Date: Tue, 23 Feb 2010 21:08:07 -0700
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Tim X wrote:
Trying to remove all definitions of interactive functions that are
thought to be unnecessary will fail and is a pointless exercise. It will
never result in a small/convenient number of commands being shown with
just M-x <tab>. I'd suspect that even just the C built-in commands alone
would likely be too numerous and you cannot remove them. This approach
is essentially futile.

I don't think that's what the OP is asking for.  Rather, why not remove
the function binding from symbols that would autoload an unavailable lisp
library (such as the ones the OP has already removed):

(mapatoms (lambda (symbol)
            (let (function)
              (when (and (fboundp symbol)
                         (setq function (symbol-function symbol))
                         (consp function)
                         ;; (car function)
                         (eq (car function) 'autoload)
                         ;; (cadr function)
                         (stringp (cadr function))
                         (not (locate-library (cadr function))))
                ;; (message "invalid autoload: %s: %s" symbol (cadr function))
                (fmakunbound symbol)))))

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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