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

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

[elpa] master 75aa14d 17/19: Fix thing-at-point in describe-function and


From: Oleh Krehel
Subject: [elpa] master 75aa14d 17/19: Fix thing-at-point in describe-function and -variable
Date: Thu, 16 Apr 2015 12:18:14 +0000

branch: master
commit 75aa14d736de018875bc7f859c019f01286021ef
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Fix thing-at-point in describe-function and -variable
    
    * counsel.el (counsel-describe-variable): Update.
    (counsel-describe-function): Update.
---
 counsel.el |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 24e9d6d..4c720f2 100644
--- a/counsel.el
+++ b/counsel.el
@@ -45,6 +45,7 @@
   (interactive
    (let ((v (variable-at-point))
          (enable-recursive-minibuffers t)
+         (preselect (thing-at-point 'symbol))
          val)
      (setq val (ivy-read
                 (if (symbolp v)
@@ -57,7 +58,8 @@
                      (when (or (get vv 'variable-documentation)
                                (and (boundp vv) (not (keywordp vv))))
                        (push (symbol-name vv) cands))))
-                  cands)))
+                  cands)
+                nil nil preselect))
      (list (if (equal val "")
                v
              (intern val)))))
@@ -68,6 +70,7 @@
   (interactive
    (let ((fn (function-called-at-point))
          (enable-recursive-minibuffers t)
+         (preselect (thing-at-point 'symbol))
          val)
      (setq val (ivy-read (if fn
                              (format "Describe function (default %s): " fn)
@@ -77,7 +80,8 @@
                             (lambda (x)
                               (when (fboundp x)
                                 (push (symbol-name x) cands))))
-                           cands)))
+                           cands)
+                         nil nil preselect))
      (list (if (equal val "")
                fn (intern val)))))
   (describe-function function))



reply via email to

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