Created
June 3, 2009 06:48
-
-
Save imakado/122829 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 anything-c-buffer-list () | |
"Return the list of names of buffers with boring buffers filtered out. | |
Boring buffers is specified by `anything-c-boring-buffer-regexp'. | |
The first buffer in the list will be the last recently used | |
buffer that is not the current buffer." | |
(let* ((buffers (mapcar 'buffer-name (buffer-list))) | |
(buffers (append (cdr buffers) (list (car buffers)))) | |
(cur-buf-name (with-current-buffer anything-current-buffer | |
(and (current-buffer) | |
(buffer-name (current-buffer)))))) | |
(cond | |
(cur-buf-name | |
(setq buffers (delete cur-buf-name buffers)) | |
(add-to-list 'buffers cur-buf-name t) | |
buffers) | |
(t buffers)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment