emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 948620f 04/31: Propertize remote buffers with ivy-remote f


From: Oleh Krehel
Subject: [elpa] master 948620f 04/31: Propertize remote buffers with ivy-remote face
Date: Fri, 01 May 2015 14:28:42 +0000

branch: master
commit 948620f3b5c6d7bc645601bf5202d7b641472e1f
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Propertize remote buffers with ivy-remote face
    
    * ivy.el (ivy-remote): New face.
    (ivy-read): Update.
    
    Fixes #61
---
 ivy.el |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ivy.el b/ivy.el
index 2330ac0..0275a2c 100644
--- a/ivy.el
+++ b/ivy.el
@@ -52,6 +52,10 @@
   '((t (:weight bold)))
   "Face used by Ivy for highlighting subdirs in the alternatives.")
 
+(defface ivy-remote
+  '((t (:foreground "#110099")))
+  "Face used by Ivy for highlighting remotes in the alternatives.")
+
 (defcustom ivy-height 10
   "Number of lines for the minibuffer window."
   :type 'integer)
@@ -466,6 +470,15 @@ When SORT is t, refer to `ivy-sort-functions-alist' for 
sorting."
                          (equal initial-input default-directory))
                (setq coll (cons initial-input coll)))
              (setq initial-input nil)))
+          ((eq collection 'internal-complete-buffer)
+           (setq coll
+                 (mapcar (lambda (x)
+                           (if (with-current-buffer x
+                                 (file-remote-p
+                                  (abbreviate-file-name default-directory)))
+                               (propertize x 'face 'ivy-remote)
+                             x))
+                         (all-completions "" collection predicate))))
           ((or (functionp collection)
                (vectorp collection)
                (listp (car collection)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]