Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add smex-mode, a global minor mode #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions smex.el
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@
:group 'convenience
:link '(emacs-library-link :tag "Lisp File" "smex.el"))

;;;###autoload
(define-minor-mode smex-mode
"Use ido completion for M-x"
:global t
:group 'smex
(if smex-mode
(progn
(unless smex-initialized-p
(smex-initialize))
(global-set-key [remap execute-extended-command] 'smex))
(when (eq (global-key-binding [remap execute-extended-command]) 'smex)
(global-unset-key [remap execute-extended-command]))))

(defcustom smex-auto-update t
"If non-nil, `Smex' checks for new commands each time it is run.
Turn it off for minor speed improvements on older systems."
Expand Down