diff options
| author | Omar AntolĂn Camarena <omar.antolin@gmail.com> | 2021-11-25 08:37:42 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-25 08:37:42 -0600 |
| commit | c8731aacfaa92aceda0a2c060c78a75a6b443874 (patch) | |
| tree | 9f864ebd1247891c406eabe744bbd66a926c1d5c | |
| parent | 8cea82b6d395078d0105f4957d4a95206dc9c7ba (diff) | |
| parent | c615334c79660a5e6876ee6147740eef56824320 (diff) | |
Merge pull request #98 from minad/fix-try
Fix orderless-try-completion for hash tables and alists
| -rw-r--r-- | orderless.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/orderless.el b/orderless.el index 9250756..d24e3b5 100644 --- a/orderless.el +++ b/orderless.el @@ -464,11 +464,14 @@ This function is part of the `orderless' completion style." ;; Should be more or less allocation-free since our "predicate" ;; always returns nil. (orderless-filter string table - (lambda (str) - (when (or (not pred) (funcall pred str)) + ;; key/value for hash tables + (lambda (&rest args) + (when (or (not pred) (apply pred args)) (when one (throw 'orderless--many (cons string point))) - (setq one str)) + (setq one (car args) ;; first argument is key + one (if (consp args) (car args) args) ;; alist + one (if (symbolp one) (symbol-name one) one))) nil)) (when one (if (equal string one) |
