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

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

[elpa] master e7146e5 089/399: counsel.el (counsel-git-grep-count-functi


From: Oleh Krehel
Subject: [elpa] master e7146e5 089/399: counsel.el (counsel-git-grep-count-function): Fix
Date: Sat, 20 Jul 2019 14:56:55 -0400 (EDT)

branch: master
commit e7146e58f94b1c519635596944f008f3ba28b546
Author: Basil L. Contovounesios <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel-git-grep-count-function): Fix
    
    Fix quoting in custom :type and clarify documentation.
    Declare obsolete varaliases before their referents.
    
    Re: #1402
    Fixes #1975
---
 counsel.el | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/counsel.el b/counsel.el
index 8db26d3..bd65c4f 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1409,6 +1409,11 @@ COMMAND fails.  Obey file handlers based on 
`default-directory'."
              (signal (car status) (cdr status))))
       (delete-file stderr))))
 
+(define-obsolete-variable-alias 'counsel--git-grep-count-func
+    'counsel-git-grep-count-function "0.11.0")
+(define-obsolete-function-alias 'counsel--git-grep-count-func-default
+    'counsel-git-grep-count-function-du "0.11.0")
+
 (defun counsel-git-grep-count-function-du ()
   "Default function to calculate `counsel--git-grep-count'."
   (or (unless (eq system-type 'windows-nt)
@@ -1418,19 +1423,15 @@ COMMAND fails.  Obey file handlers based on 
`default-directory'."
       0))
 
 (defcustom counsel-git-grep-count-function #'counsel-git-grep-count-function-du
-  "Defun to calculate `counsel--git-grep-count' for `counsel-git-grep'."
-  :type '(choice
-          (const :tag "Grep always does filtering."
+  "Function to calculate `counsel--git-grep-count' for `counsel-git-grep'."
+  :type '(radio
+          (function-item :doc "Always filter with Grep"
            (lambda () most-positive-fixnum))
-          (const :tag "Emacs always does filtering."
+          (function-item :doc "Always filter with Emacs"
            (lambda () 0))
-          (const :tag "Decide on Grep or Emacs based on .git directory size."
-           'counsel-git-grep-count-function-du)))
-
-(define-obsolete-variable-alias 'counsel--git-grep-count-func
-    'counsel-git-grep-count-function "0.11.0")
-(define-obsolete-function-alias 'counsel--git-grep-count-func-default
-    'counsel-git-grep-count-function-du "0.11.0")
+          (function-item
+           :doc "Choose between Grep or Emacs based on .git directory size"
+           counsel-git-grep-count-function-du)))
 
 ;;;###autoload
 (defun counsel-git-grep (&optional cmd initial-input)



reply via email to

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