Created
June 15, 2011 05:01
-
-
Save mechairoi/1026506 to your computer and use it in GitHub Desktop.
This file contains 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
(anything-c-arrange-type-attribute 'buffer | |
'((candidate-transformer REST | |
anything-c-highlight-buffers) | |
(display-to-real anything-my-get-buffer REST))) | |
(defun anything-my-get-buffer (buffer-or-filename) | |
(if (bufferp buffer-or-filename) | |
buffer-or-filename | |
(get-file-buffer buffer-or-filename))) | |
;; override anything-config.el | |
(defun anything-c-highlight-buffers (buffers) | |
(require 'dired) | |
(loop for i in buffers | |
if (rassoc (get-buffer i) dired-buffers) | |
collect (propertize i | |
'face anything-c-buffers-face1 | |
'help-echo (car (rassoc (get-buffer i) dired-buffers))) | |
if (buffer-file-name (get-buffer i)) | |
collect (propertize (buffer-file-name (get-buffer i)) | |
'face anything-c-buffers-face2 | |
'help-echo (buffer-file-name (get-buffer i))) | |
if (and (not (rassoc (get-buffer i) dired-buffers)) | |
(not (buffer-file-name (get-buffer i)))) | |
collect (propertize i | |
'face anything-c-buffers-face3))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment