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

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

[elpa] master 47a220d 023/167: Support hash tables in ivy-read


From: Oleh Krehel
Subject: [elpa] master 47a220d 023/167: Support hash tables in ivy-read
Date: Tue, 08 Dec 2015 10:49:40 +0000

branch: master
commit 47a220d521b9fb916f0d51da2df229a9ff7870b7
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Support hash tables in ivy-read
    
    * ivy.el (ivy--reset-state): `all-completions' also works fine for hash
      tables, so start using it.
    
    Hash tables as collections are rare. One example is "C-c C-w"
    in *rcirc* (`rcirc-cmd-whois').
---
 ivy.el |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ivy.el b/ivy.el
index 6c3c789..7885a9c 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1026,10 +1026,9 @@ This is useful for recursive `ivy-read'."
             ((or (functionp collection)
                  (byte-code-function-p collection)
                  (vectorp collection)
-                 (listp (car collection)))
+                 (and (consp collection) (listp (car collection)))
+                 (hash-table-p collection))
              (setq coll (all-completions "" collection predicate)))
-            ((hash-table-p collection)
-             (error "Hash table as a collection unsupported"))
             (t
              (setq coll collection)))
       (when sort



reply via email to

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