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

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

[elpa] externals/embark ce1aca6005 2/2: Merge pull request #603 from min


From: ELPA Syncer
Subject: [elpa] externals/embark ce1aca6005 2/2: Merge pull request #603 from minad/drop-selectrum
Date: Sun, 19 Feb 2023 09:57:41 -0500 (EST)

branch: externals/embark
commit ce1aca600560d359ae85a20b36f6de19d3833771
Merge: 5497a19eef 7598b1ed02
Author: Omar AntolĂ­n Camarena <omar.antolin@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #603 from minad/drop-selectrum
    
    Drop Selectrum support
---
 README.org  |  4 ++--
 embark.el   | 48 +-----------------------------------------------
 embark.texi |  4 ++--
 3 files changed, 5 insertions(+), 51 deletions(-)

diff --git a/README.org b/README.org
index 898bc691a9..dec9fb39cc 100644
--- a/README.org
+++ b/README.org
@@ -223,7 +223,7 @@ Finally, there is also an =embark-live= variant of the 
=embark-collect=
 command which automatically updates the collection after each change
 in the source buffer. Users of a completion UI that automatically
 updates and displays the candidate list (such as Vertico, Icomplete,
-Selectrum, Fido-mode, or MCT) will probably not want to use
+Fido-mode, or MCT) will probably not want to use
 =embark-live= from the minibuffer as they will then have two live
 updating displays of the completion candidates!
 
@@ -358,7 +358,7 @@ Embark needs to know what your minibuffer completion system 
considers
 to be the list of candidates and which one is the current candidate.
 Embark works out of the box if you use Emacs's default tab completion,
 the built-in =icomplete-mode= or =fido-mode=, or the third-party packages
-[[https://github.com/minad/vertico][Vertico]], 
[[https://github.com/raxod502/selectrum/][Selectrum]] or 
[[https://github.com/abo-abo/swiper][Ivy]].
+[[https://github.com/minad/vertico][Vertico]] or 
[[https://github.com/abo-abo/swiper][Ivy]].
 
 If you are a [[https://emacs-helm.github.io/helm/][Helm]] or 
[[https://github.com/abo-abo/swiper][Ivy]] user you are unlikely to want Embark 
since
 those packages include comprehensive functionality for acting on
diff --git a/embark.el b/embark.el
index 19f7672823..143da9e738 100644
--- a/embark.el
+++ b/embark.el
@@ -893,7 +893,7 @@ This target finder is meant for the default completion UI 
and
 completion UI highly compatible with it, like Icomplete.
 Many completion UIs can still work with Embark but will need
 their own target finder.  See for example
-`embark--vertico-selected' or `embark--selectrum-selected'."
+`embark--vertico-selected'."
   (when (and (minibufferp) minibuffer-completion-table)
     (pcase-let* ((`(,category . ,candidates) (embark-minibuffer-candidates))
                  (contents (minibuffer-contents))
@@ -3362,52 +3362,6 @@ Return the category metadatum as the type of the 
candidates."
   (add-hook 'embark-target-finders #'embark--vertico-selected)
   (add-hook 'embark-candidate-collectors #'embark--vertico-candidates))
 
-;; selectrum
-
-(declare-function selectrum--get-meta "ext:selectrum")
-(declare-function selectrum-get-current-candidate "ext:selectrum")
-(declare-function selectrum-get-current-candidates "ext:selectrum")
-(declare-function selectrum-exhibit "ext:selectrum")
-(defvar selectrum-is-active)
-(defvar selectrum--previous-input-string)
-
-(defun embark--selectrum-selected ()
-  "Target the currently selected item in Selectrum.
-Return the category metadatum as the type of the target."
-  (when selectrum-is-active
-    ;; Force candidate computation, if candidates are not yet available.
-    (unless selectrum--previous-input-string
-      (selectrum-exhibit))
-    (cons (selectrum--get-meta 'category)
-          (selectrum-get-current-candidate))))
-
-(defun embark--selectrum-candidates ()
-  "Collect the current Selectrum candidates.
-Return the category metadatum as the type of the candidates."
-  (when selectrum-is-active
-    ;; Force candidate computation, if candidates are not yet available.
-    (unless selectrum--previous-input-string
-      (selectrum-exhibit))
-    (cons (selectrum--get-meta 'category)
-          (selectrum-get-current-candidates
-           ;; Pass relative file names for dired.
-           minibuffer-completing-file-name))))
-
-(defun embark--selectrum-indicator ()
-  "Embark indicator highlighting the current Selectrum candidate."
-  (let ((fr face-remapping-alist))
-    (lambda (&optional keymap _targets _prefix)
-      (when selectrum-is-active
-        (setq-local face-remapping-alist
-                    (if keymap
-                        (cons '(selectrum-current-candidate . embark-target) 
fr)
-                      fr))))))
-
-(with-eval-after-load 'selectrum
-  (add-hook 'embark-indicators #'embark--selectrum-indicator)
-  (add-hook 'embark-target-finders #'embark--selectrum-selected)
-  (add-hook 'embark-candidate-collectors #'embark--selectrum-candidates))
-
 ;; ivy
 
 (declare-function ivy--expand-file-name "ext:ivy")
diff --git a/embark.texi b/embark.texi
index b89bb7d6b0..08c23f1e19 100644
--- a/embark.texi
+++ b/embark.texi
@@ -332,7 +332,7 @@ Finally, there is also an @samp{embark-live} variant of the 
@samp{embark-collect
 command which automatically updates the collection after each change
 in the source buffer. Users of a completion UI that automatically
 updates and displays the candidate list (such as Vertico, Icomplete,
-Selectrum, Fido-mode, or MCT) will probably not want to use
+Fido-mode, or MCT) will probably not want to use
 @samp{embark-live} from the minibuffer as they will then have two live
 updating displays of the completion candidates!
 
@@ -474,7 +474,7 @@ Embark needs to know what your minibuffer completion system 
considers
 to be the list of candidates and which one is the current candidate.
 Embark works out of the box if you use Emacs's default tab completion,
 the built-in @samp{icomplete-mode} or @samp{fido-mode}, or the third-party 
packages
-@uref{https://github.com/minad/vertico, Vertico}, 
@uref{https://github.com/raxod502/selectrum/, Selectrum} or 
@uref{https://github.com/abo-abo/swiper, Ivy}.
+@uref{https://github.com/minad/vertico, Vertico} or 
@uref{https://github.com/abo-abo/swiper, Ivy}.
 
 If you are a @uref{https://emacs-helm.github.io/helm/, Helm} or 
@uref{https://github.com/abo-abo/swiper, Ivy} user you are unlikely to want 
Embark since
 those packages include comprehensive functionality for acting on



reply via email to

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