[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ido breaks command-history
From: |
muede |
Subject: |
Re: ido breaks command-history |
Date: |
Mon, 13 Jul 2009 13:40:06 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Jul 12, 2:58 am, dnquark <dnqu...@gmail.com> wrote:
> I am using ido to complete the M-x commands, as described on EmacsWiki
> --http://www.emacswiki.org/emacs/InteractivelyDoThings.
> Unfortunately, when ido is used M-x commands are no longer recorder in
> the command history. As a result, C-x z, as well as browsing history
> in the minibuffer with M-p and M-n no longer works. Does anyone have
> an idea of how to go about fixing thisi?.. The emacsWiki code is
> below:
>
> (setq ido-execute-command-cache nil)
>
> (defun ido-execute-command ()
> (interactive)
> (call-interactively
> (intern
> (ido-completing-read
> "M-x "
> (progn
> (unless ido-execute-command-cache
> (mapatoms (lambda (s)
> (when (commandp s)
> (setq ido-execute-command-cache
> (cons (format "%S" s) ido-execute-
> command-cache))))))
> ido-execute-command-cache)))))
>
> (add-hook 'ido-setup-hook
> (lambda ()
> (setq ido-enable-flex-matching t)
> (global-set-key "\M-x" 'ido-execute-command)))
`repeat' handles the special case, where `last-repeatable-command'
is `exit-minibuffer', so a advice, which treats `ido-exit-minibuffer'
as `exit-minibuffer' will probably work.
(defadvice repeat (before repeat-fix-ido activate)
(when (eq last-repeatable-command 'ido-exit-minibuffer)
(setq last-repeatable-command 'exit-minibuffer)))
-ap