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

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

[elpa] externals/embark b8564a9 2/6: Use add-to-list


From: ELPA Syncer
Subject: [elpa] externals/embark b8564a9 2/6: Use add-to-list
Date: Tue, 16 Nov 2021 16:57:16 -0500 (EST)

branch: externals/embark
commit b8564a9a97de63f243693ef65e79903f5639936f
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Use add-to-list
---
 embark-consult.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/embark-consult.el b/embark-consult.el
index ba7d18e..c0d9f9e 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -313,22 +313,19 @@ that is a Consult async command."
 
 ;;; Tables of contents for buffers: imenu and outline candidate collectors
 
-
 (defun embark-consult-toc-outline ()
-  "Collect all outline headings in the current buffer." 
+  "Collect all outline headings in the current buffer."
   (cons 'consult-location (consult--outline-candidates)))
 
 (defun embark-consult-toc-imenu ()
-  "Collect all imenu items in the current buffer." 
+  "Collect all imenu items in the current buffer."
   (cons 'consult-location
         (mapcar (pcase-lambda (`(,item . ,pos))
                   (propertize item 'consult-location
                               (cons pos (line-number-at-pos pos))))
                 (consult-imenu--items))))
 
-(unless (memq 'embark-consult-toc-outline embark-candidate-collectors)
-  (setq embark-candidate-collectors
-        (append embark-candidate-collectors '(embark-consult-toc-outline))))
+(add-to-list 'embark-candidate-collectors #'embark-consult-toc-outline 'append)
 
 (provide 'embark-consult)
 ;;; embark-consult.el ends here



reply via email to

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