[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult cf701bd8fc 1/2: Use consult--with-increased-gc
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult cf701bd8fc 1/2: Use consult--with-increased-gc less often |
Date: |
Mon, 13 Jun 2022 06:57:27 -0400 (EDT) |
branch: externals/consult
commit cf701bd8fcf9559a1244ac8ebecc49230403d7a4
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Use consult--with-increased-gc less often
---
consult-compile.el | 11 +++++------
consult-flymake.el | 21 ++++++++++-----------
consult-org.el | 2 +-
consult-xref.el | 2 +-
consult.el | 13 +++++--------
5 files changed, 22 insertions(+), 27 deletions(-)
diff --git a/consult-compile.el b/consult-compile.el
index 959e67f9a3..9f8b00b5a0 100644
--- a/consult-compile.el
+++ b/consult-compile.el
@@ -107,12 +107,11 @@ buffers related to the current buffer. The command
supports
preview of the currently selected error."
(interactive)
(consult--read
- (consult--with-increased-gc
- (or (mapcan #'consult-compile--error-candidates
- (or (consult-compile--compilation-buffers
- default-directory)
- (user-error "No compilation buffers found for the current
buffer")))
- (user-error "No compilation errors found")))
+ (or (mapcan #'consult-compile--error-candidates
+ (or (consult-compile--compilation-buffers
+ default-directory)
+ (user-error "No compilation buffers found for the current
buffer")))
+ (user-error "No compilation errors found"))
:prompt "Go to error: "
:category 'consult-compile-error
:sort nil
diff --git a/consult-flymake.el b/consult-flymake.el
index 7f9c28f24e..3eebf58790 100644
--- a/consult-flymake.el
+++ b/consult-flymake.el
@@ -90,17 +90,16 @@ buffers in the current project instead of just the current
buffer."
(interactive "P")
(consult--forbid-minibuffer)
(consult--read
- (consult--with-increased-gc
- (consult-flymake--candidates
- (or
- (if-let (((and project (fboundp 'flymake--project-diagnostics)))
- (project (project-current)))
- (flymake--project-diagnostics project)
- (flymake-diagnostics))
- (user-error "No flymake errors (Status: %s)"
- (if (seq-difference (flymake-running-backends)
- (flymake-reporting-backends))
- 'running 'finished)))))
+ (consult-flymake--candidates
+ (or
+ (if-let (((and project (fboundp 'flymake--project-diagnostics)))
+ (project (project-current)))
+ (flymake--project-diagnostics project)
+ (flymake-diagnostics))
+ (user-error "No flymake errors (Status: %s)"
+ (if (seq-difference (flymake-running-backends)
+ (flymake-reporting-backends))
+ 'running 'finished))))
:prompt "Flymake diagnostic: "
:category 'consult-flymake-error
:history t ;; disable history
diff --git a/consult-org.el b/consult-org.el
index 6e01b22460..3f2f54501d 100644
--- a/consult-org.el
+++ b/consult-org.el
@@ -92,7 +92,7 @@ buffer are offered."
(user-error "Must be called from an Org buffer")))
(let ((prefix (not (memq scope '(nil tree region region-start-level file)))))
(consult--read
- (consult--with-increased-gc (consult-org--headings prefix match scope))
+ (consult-org--headings prefix match scope)
:prompt "Go to heading: "
:category 'consult-org-heading
:sort nil
diff --git a/consult-xref.el b/consult-xref.el
index 2a32c0648b..8405abac34 100644
--- a/consult-xref.el
+++ b/consult-xref.el
@@ -89,7 +89,7 @@ This function can be used for `xref-show-xrefs-function'.
See `xref-show-xrefs-function' for the description of the
FETCHER and ALIST arguments."
(let* ((consult-xref--fetcher fetcher)
- (candidates (consult--with-increased-gc (consult-xref--candidates)))
+ (candidates (consult-xref--candidates))
(display (alist-get 'display-action alist)))
(xref-pop-to-location
(if (cdr candidates)
diff --git a/consult.el b/consult.el
index 77c0ffe3bd..e7a7ec2137 100644
--- a/consult.el
+++ b/consult.el
@@ -2683,8 +2683,7 @@ See `multi-occur' for the meaning of the arguments BUFS,
REGEXP and NLINES."
This command supports narrowing to a heading level and candidate preview.
The symbol at point is added to the future history."
(interactive)
- (let* ((candidates
- (consult--with-increased-gc (consult--outline-candidates)))
+ (let* ((candidates (consult--outline-candidates))
(min-level (- (apply #'min (mapcar
(lambda (cand)
(get-text-property 0
'consult--outline-level cand))
@@ -2741,9 +2740,8 @@ The command supports preview of the currently selected
marker position.
The symbol at point is added to the future history."
(interactive)
(consult--read
- (consult--with-increased-gc
- (consult--mark-candidates
- (or markers (cons (mark-marker) mark-ring))))
+ (consult--mark-candidates
+ (or markers (cons (mark-marker) mark-ring)))
:prompt "Go to mark: "
:annotate (consult--line-prefix)
:category 'consult-location
@@ -2789,9 +2787,8 @@ The command supports preview of the currently selected
marker position.
The symbol at point is added to the future history."
(interactive)
(consult--read
- (consult--with-increased-gc
- (consult--global-mark-candidates
- (or markers global-mark-ring)))
+ (consult--global-mark-candidates
+ (or markers global-mark-ring))
:prompt "Go to global mark: "
;; Despite `consult-global-mark' formating the candidates in grep-like
;; style, we are not using the 'consult-grep category, since the candidates