[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 47f53b6 073/167: counsel.el (counsel--find-symbol): Resolv
From: |
Oleh Krehel |
Subject: |
[elpa] master 47f53b6 073/167: counsel.el (counsel--find-symbol): Resolve name clash better |
Date: |
Tue, 08 Dec 2015 10:49:58 +0000 |
branch: master
commit 47f53b605abadccf19e3c6b55aef5360ae197249
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel--find-symbol): Resolve name clash better
* counsel.el (counsel--find-symbol): When the symbol is both bound and
fbound, prefer the fbound one, unless the :caller is
`counsel-describe-variable'.
(counsel-describe-variable): Declare :caller.
(counsel-describe-function): Declare :caller.
One example is going to the definition of `isearch-forward' (also with
`counsel-M-x').
---
counsel.el | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/counsel.el b/counsel.el
index ef67be9..eab1a3c 100644
--- a/counsel.el
+++ b/counsel.el
@@ -175,10 +175,14 @@
(if full-name
(find-library full-name)
(let ((sym (read x)))
- (cond ((boundp sym)
+ (cond ((and (eq (ivy-state-caller ivy-last)
+ 'counsel-describe-variable)
+ (boundp sym))
(find-variable sym))
((fboundp sym)
(find-function sym))
+ ((boundp sym)
+ (find-variable sym))
((or (featurep sym)
(locate-library
(prin1-to-string sym)))
@@ -224,7 +228,8 @@
:sort t
:action (lambda (x)
(describe-variable
- (intern x))))))
+ (intern x)))
+ :caller 'counsel-describe-variable)))
(ivy-set-actions
'counsel-describe-variable
@@ -255,7 +260,8 @@
:sort t
:action (lambda (x)
(describe-function
- (intern x))))))
+ (intern x)))
+ :caller 'counsel-describe-function)))
(defvar info-lookup-mode)
(declare-function info-lookup->completions "info-look")
- [elpa] master 2404db1 053/167: Add feedback for long-running async processes, (continued)
- [elpa] master 2404db1 053/167: Add feedback for long-running async processes, Oleh Krehel, 2015/12/08
- [elpa] master d4d53d8 059/167: ivy.el (ivy-partial): Fix for fuzzy completion, Oleh Krehel, 2015/12/08
- [elpa] master 2ae7d74 058/167: Fix the count in user-specified counsel-git-grep, Oleh Krehel, 2015/12/08
- [elpa] master fd19ab1 062/167: Add a test for the perfect match logic, Oleh Krehel, 2015/12/08
- [elpa] master 2386277 060/167: ivy.el (ivy-resume): Pass caller, Oleh Krehel, 2015/12/08
- [elpa] master 607fd1f 061/167: Bring back the lost perfect match logic, Oleh Krehel, 2015/12/08
- [elpa] master f0acebd 063/167: Fix Custom menus, Oleh Krehel, 2015/12/08
- [elpa] master f6dd9cd 066/167: ivy.el (ivy-alt-done): Fix up last commit, Oleh Krehel, 2015/12/08
- [elpa] master a11c978 068/167: ivy-immediate-done should use ivy--directory, Oleh Krehel, 2015/12/08
- [elpa] master d8673f8 078/167: ivy.el (ffap): Move require, Oleh Krehel, 2015/12/08
- [elpa] master 47f53b6 073/167: counsel.el (counsel--find-symbol): Resolve name clash better,
Oleh Krehel <=
- [elpa] master dc84ba3 070/167: Rename and move the minibuffer faces, Oleh Krehel, 2015/12/08
- [elpa] master 183b803 071/167: Use a specific blending method for dark themes, Oleh Krehel, 2015/12/08
- [elpa] master f9ef307 072/167: Improve the preselect index in ivy-resume, Oleh Krehel, 2015/12/08
- [elpa] master 576563d 082/167: ivy.el (with-ivy-window): Ensure window is live, Oleh Krehel, 2015/12/08
- [elpa] master f60d10e 075/167: "C-x C-f M-n" can call ffap-url-fetcher when at URL, Oleh Krehel, 2015/12/08
- [elpa] master bd93a0f 081/167: ivy.el (ivy-state): Add a new field BUFFER, Oleh Krehel, 2015/12/08
- [elpa] master 202546b 080/167: swiper.el (swiper-mc): Update, Oleh Krehel, 2015/12/08
- [elpa] master f00696a 056/167: ivy.el (ivy-extra-directories): Improve :type, Oleh Krehel, 2015/12/08
- [elpa] master e338785 057/167: ivy.el (ivy-sort-functions-alist): Upgrade to defcustom, Oleh Krehel, 2015/12/08
- [elpa] master 71695df 065/167: "C-j" should not stop completion for a pasted file path, Oleh Krehel, 2015/12/08