Skip to content

Instantly share code, notes, and snippets.

@ieure
Created December 7, 2011 18:46
Show Gist options
  • Save ieure/1444060 to your computer and use it in GitHub Desktop.
Save ieure/1444060 to your computer and use it in GitHub Desktop.
(defmacro with-ido (&rest body)
"Evaluate BODY with ido-mode enabled."
(let ((save-symbol (gensym "with-ido-save")))
`(let ((,save-symbol (or ido-mode -1)))
(unwind-protect
(progn
(ido-mode 1)
,@body)
(ido-mode ,save-symbol)))))
(defun ido-ffip ()
(interactive)
(with-ido (call-interactively 'ffip)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment