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

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

[nongnu] elpa/helm a7a988a362 2/3: Use helm--map-candidates-in-source in


From: ELPA Syncer
Subject: [nongnu] elpa/helm a7a988a362 2/3: Use helm--map-candidates-in-source in helm-buffers as well
Date: Thu, 6 Oct 2022 02:58:50 -0400 (EDT)

branch: elpa/helm
commit a7a988a3622fb0c8b011c1b12abf380490b17673
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Use helm--map-candidates-in-source in helm-buffers as well
---
 helm-buffers.el | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/helm-buffers.el b/helm-buffers.el
index 1c9dd4fc5b..959ac6f27a 100644
--- a/helm-buffers.el
+++ b/helm-buffers.el
@@ -606,23 +606,10 @@ buffers)."
            (type (or type
                      (get-text-property
                       0 'type (helm-get-selection nil 'withprop src)))))
-      (save-excursion
-        (goto-char (helm-get-previous-header-pos))
-        (helm-next-line)
-        (let* ((next-head (helm-get-next-header-pos))
-               (end       (and next-head
-                               (save-excursion
-                                 (goto-char next-head)
-                                 (forward-line -1)
-                                 (point))))
-               (maxpoint  (or end (point-max))))
-          (while (< (point) maxpoint)
-            (helm-mark-current-line)
-            (let ((cand (helm-get-selection nil 'withprop src)))
-              (when (and (not (helm-this-visible-mark))
-                         (eq (get-text-property 0 'type cand) type))
-                (helm-make-visible-mark)))
-            (forward-line 1) (end-of-line))))
+      (helm--map-candidates-in-source
+       src #'helm-make-visible-mark
+       (lambda (cand)
+         (eq (get-text-property 0 'type cand) type)))
       (helm-mark-current-line)
       (helm-display-mode-line src t)
       (when helm-marked-candidates



reply via email to

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