Commit 11649c3
committed
Fix counsel-M-x regression with amx/smex
Historically counsel-M-x transformed the amx and smex collections
into something that could be manipulated uniformly with the default
obarray candidates.
Recently this was refactored and opened up via the user option
counsel-M-x-collection to arbitrary completion tables.
The counsel-M-x :predicate was adapted accordingly, but I forgot to
check other relevant actions and key bindings.
This patch tries to introduce a bit more uniformity in action
argument handling, at least as is relevant to counsel-M-x.
* ivy.el (ivy--action-cand-to-str): New convenience function.
(ivy--action-insert, ivy--action-copy):
* counsel.el (counsel--info-lookup-symbol, counsel--find-symbol):
Use it to handle symbol-keyed alists.
(counsel--action-cand-to-interned): New convenience function,
similar in spirit but opposite to ivy--action-cand-to-str.
(counsel--describe-function): Use it to handle alists.
(counsel-M-x-action): Handle alists (#3078) and as yet unknown atoms
for flexibility.
(counsel-descbinds-action-find): Simplify now that
counsel--find-symbol takes symbols.
(counsel-descbinds-action-info): Simplify;
counsel-info-lookup-symbol takes both symbols and strings.
Fixes #3078.1 parent 4defb81 commit 11649c3
2 files changed
+44
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
481 | 483 | | |
482 | 484 | | |
483 | 485 | | |
| |||
497 | 499 | | |
498 | 500 | | |
499 | 501 | | |
500 | | - | |
| 502 | + | |
501 | 503 | | |
502 | 504 | | |
503 | | - | |
| 505 | + | |
| 506 | + | |
504 | 507 | | |
505 | 508 | | |
506 | 509 | | |
| |||
586 | 589 | | |
587 | 590 | | |
588 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
589 | 598 | | |
590 | 599 | | |
591 | | - | |
| 600 | + | |
| 601 | + | |
592 | 602 | | |
593 | 603 | | |
594 | 604 | | |
| |||
995 | 1005 | | |
996 | 1006 | | |
997 | 1007 | | |
998 | | - | |
999 | | - | |
1000 | | - | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
1001 | 1019 | | |
1002 | 1020 | | |
1003 | 1021 | | |
| |||
1237 | 1255 | | |
1238 | 1256 | | |
1239 | 1257 | | |
1240 | | - | |
| 1258 | + | |
1241 | 1259 | | |
1242 | 1260 | | |
1243 | 1261 | | |
1244 | 1262 | | |
1245 | 1263 | | |
1246 | | - | |
| 1264 | + | |
1247 | 1265 | | |
1248 | 1266 | | |
1249 | 1267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4796 | 4796 | | |
4797 | 4797 | | |
4798 | 4798 | | |
4799 | | - | |
4800 | | - | |
| 4799 | + | |
| 4800 | + | |
4801 | 4801 | | |
4802 | 4802 | | |
4803 | 4803 | | |
4804 | 4804 | | |
4805 | 4805 | | |
4806 | 4806 | | |
| 4807 | + | |
| 4808 | + | |
| 4809 | + | |
| 4810 | + | |
| 4811 | + | |
4807 | 4812 | | |
4808 | | - | |
4809 | | - | |
4810 | | - | |
4811 | | - | |
| 4813 | + | |
| 4814 | + | |
| 4815 | + | |
| 4816 | + | |
| 4817 | + | |
4812 | 4818 | | |
4813 | 4819 | | |
4814 | | - | |
4815 | | - | |
4816 | | - | |
4817 | | - | |
| 4820 | + | |
| 4821 | + | |
| 4822 | + | |
| 4823 | + | |
| 4824 | + | |
4818 | 4825 | | |
4819 | 4826 | | |
4820 | 4827 | | |
| |||
0 commit comments