Created
July 8, 2010 20:09
-
-
Save jollm/468533 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun ido-bury-buffer-at-head () | |
"Bury the buffer at the head of `ido-matches'. | |
If cursor is not at the end of the user input, delete to end of input." | |
(interactive) | |
(if (not (eobp)) | |
(delete-region (point) (line-end-position)) | |
(let ((enable-recursive-minibuffers t) | |
(buf (ido-name (car ido-matches)))) | |
(when buf | |
(bury-buffer buf) | |
(setq ido-cur-list (append (remove (car ido-matches) ido-cur-list) (list (car ido-matches)))) | |
(setq ido-rescan t))))) | |
(define-key ido-buffer-completion-map "\C-c\y" 'ido-bury-buffer-at-head) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment