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

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

[elpa] externals/ivy-hydra 3a2c5b2 300/395: counsel.el: Mark obsolete th


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 3a2c5b2 300/395: counsel.el: Mark obsolete the functions that can be replaced by complete-symbol
Date: Thu, 25 Feb 2021 08:32:25 -0500 (EST)

branch: externals/ivy-hydra
commit 3a2c5b2cff2c3dcadca9675749d3e6e46eac57a4
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    counsel.el: Mark obsolete the functions that can be replaced by 
complete-symbol
---
 counsel.el | 111 +++----------------------------------------------------------
 1 file changed, 4 insertions(+), 107 deletions(-)

diff --git a/counsel.el b/counsel.el
index e0e2391..159c802 100644
--- a/counsel.el
+++ b/counsel.el
@@ -337,113 +337,10 @@ Update the minibuffer with the amount of lines collected 
every
       (delete-process process))))
 
 ;;* Completion at point
-;;** `counsel-el'
-;;;###autoload
-(defun counsel-el ()
-  "Elisp completion at point."
-  (interactive)
-  (let* ((bnd (unless (and (looking-at ")")
-                           (eq (char-before) ?\())
-                (bounds-of-thing-at-point 'symbol)))
-         (str (if bnd
-                  (buffer-substring-no-properties
-                   (car bnd)
-                   (cdr bnd))
-                ""))
-         (pred (and (eq (char-before (car bnd)) ?\()
-                    #'fboundp))
-         symbol-names)
-    (setq ivy-completion-beg (car bnd))
-    (setq ivy-completion-end (cdr bnd))
-    (if (string= str "")
-        (mapatoms
-         (lambda (x)
-           (when (and (symbolp x) (funcall pred x))
-             (push (symbol-name x) symbol-names))))
-      (setq symbol-names (all-completions str obarray pred)))
-    (ivy-read "Symbol name: " symbol-names
-              :initial-input str
-              :action #'ivy-completion-in-region-action
-              :caller 'counsel-el)))
-
-(ivy-configure 'counsel-el
-  :height 7)
-
-;;** `counsel-cl'
-(declare-function slime-symbol-start-pos "ext:slime")
-(declare-function slime-symbol-end-pos "ext:slime")
-(declare-function slime-contextual-completions "ext:slime-c-p-c")
-
-;;;###autoload
-(defun counsel-cl ()
-  "Common Lisp completion at point."
-  (interactive)
-  (setq ivy-completion-beg (slime-symbol-start-pos))
-  (setq ivy-completion-end (slime-symbol-end-pos))
-  (ivy-read "Symbol name: "
-            (car (slime-contextual-completions
-                  ivy-completion-beg
-                  ivy-completion-end))
-            :action #'ivy-completion-in-region-action))
-
-;;** `counsel-jedi'
-(declare-function deferred:sync! "ext:deferred")
-(declare-function jedi:complete-request "ext:jedi-core")
-(declare-function jedi:ac-direct-matches "ext:jedi")
-
-;;;###autoload
-(defun counsel-jedi ()
-  "Python completion at point."
-  (interactive)
-  (let ((bnd (bounds-of-thing-at-point 'symbol)))
-    (setq ivy-completion-beg (car bnd))
-    (setq ivy-completion-end (cdr bnd)))
-  (deferred:sync!
-      (jedi:complete-request))
-  (ivy-read "Symbol name: " (jedi:ac-direct-matches)
-            :action #'counsel--py-action))
-
-(defun counsel--py-action (symbol-name)
-  "Insert SYMBOL-NAME, erasing the previous one."
-  (when (stringp symbol-name)
-    (with-ivy-window
-      (when ivy-completion-beg
-        (delete-region
-         ivy-completion-beg
-         ivy-completion-end))
-      (setq ivy-completion-beg (point))
-      (insert symbol-name)
-      (setq ivy-completion-end (point)))))
-
-;;** `counsel-clj'
-(declare-function cider-sync-request:complete "ext:cider-client")
-(defun counsel--generic (completion-fn)
-  "Complete thing at point with COMPLETION-FN."
-  (let* ((bnd (or (bounds-of-thing-at-point 'symbol)
-                  (cons (point) (point))))
-         (str (buffer-substring-no-properties
-               (car bnd) (cdr bnd)))
-         (candidates (funcall completion-fn str))
-         (res (ivy-read (format "pattern (%s): " str)
-                        candidates
-                        :caller 'counsel--generic)))
-    (when (stringp res)
-      (when bnd
-        (delete-region (car bnd) (cdr bnd)))
-      (insert res))))
-
-(ivy-configure 'counsel--generic
-  :height 7)
-
-;;;###autoload
-(defun counsel-clj ()
-  "Clojure completion at point."
-  (interactive)
-  (counsel--generic
-   (lambda (str)
-     (mapcar
-      #'cl-caddr
-      (cider-sync-request:complete str ":same")))))
+(define-obsolete-function-alias 'counsel-el 'complete-symbol "<2020-05-20 
Wed>")
+(define-obsolete-function-alias 'counsel-cl 'complete-symbol "<2020-05-20 
Wed>")
+(define-obsolete-function-alias 'counsel-jedi 'complete-symbol "<2020-05-20 
Wed>")
+(define-obsolete-function-alias 'counsel-clj 'complete-symbol "<2020-05-20 
Wed>")
 
 ;;** `counsel-company'
 (defvar company-candidates)



reply via email to

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