]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix compilation warnings
authorOleh Krehel <ohwoeowho@gmail.com>
Sat, 12 Mar 2016 18:51:45 +0000 (19:51 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Sat, 12 Mar 2016 18:51:45 +0000 (19:51 +0100)
counsel.el

index 96e82f83cc0e829ca311dc73bbdccd237db3bfc0..64baa769733a86b67c24290577ed7e77de93d617 100644 (file)
@@ -170,24 +170,13 @@ Update the minibuffer with the amount of lines collected every
   '(choice
     (const :tag "Plain" counsel-prompt-function-default)
     (const :tag "Directory" counsel-prompt-function-dir)
-    (function :tag "Custom")))
+    (function :tag "Custom"))
+  :group 'ivy)
 
 (defun counsel-prompt-function-default (prompt)
   "Return PROMPT appended with a semicolon."
   (format "%s: " prompt))
 
-(defun counsel-prompt-function-dir (prompt)
-  "Return PROMPT appended with the parent directory."
-  (let ((directory counsel--git-grep-dir))
-    (format "%s [%s]: "
-            prompt
-            (let ((dir-list (eshell-split-path directory)))
-              (if (> (length dir-list) 3)
-                  (apply #'concat
-                         (append '("...")
-                                 (cl-subseq dir-list (- (length dir-list) 3))))
-                directory)))))
-
 (defun counsel-delete-process ()
   (let ((process (get-process " *counsel*")))
     (when process
@@ -752,6 +741,18 @@ Describe the selected candidate."
   '("git --no-pager grep --full-name -n --no-color -i -e %S")
   "History for `counsel-git-grep' shell commands.")
 
+(defun counsel-prompt-function-dir (prompt)
+  "Return PROMPT appended with the parent directory."
+  (let ((directory counsel--git-grep-dir))
+    (format "%s [%s]: "
+            prompt
+            (let ((dir-list (eshell-split-path directory)))
+              (if (> (length dir-list) 3)
+                  (apply #'concat
+                         (append '("...")
+                                 (cl-subseq dir-list (- (length dir-list) 3))))
+                directory)))))
+
 (defun counsel-git-grep-function (string &optional _pred &rest _unused)
   "Grep in the current git repository for STRING."
   (if (and (> counsel--git-grep-count 20000)