From c10521e97679c35a40926084e049445cc5053254 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Wed, 12 Aug 2015 15:28:55 +0300 Subject: emacs: Add and use 'guix-while-search'. * emacs/guix-utils.el (guix-while-search): New macro. * emacs/guix-pcomplete.el (guix-pcomplete-run-guix-and-search): Use it. * emacs/guix-prettify.el (guix-prettify-decompose-buffer): Likewise. --- emacs/guix-pcomplete.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'emacs/guix-pcomplete.el') diff --git a/emacs/guix-pcomplete.el b/emacs/guix-pcomplete.el index 9ec563cf52..0049c94d38 100644 --- a/emacs/guix-pcomplete.el +++ b/emacs/guix-pcomplete.el @@ -105,9 +105,8 @@ Return a list of strings matching REGEXP. GROUP specifies a parenthesized expression used in REGEXP." (with-temp-buffer (apply #'guix-pcomplete-run-guix args) - (goto-char (point-min)) (let (result) - (while (re-search-forward regexp nil t) + (guix-while-search regexp (push (match-string-no-properties group) result)) (nreverse result)))) -- cgit v1.2.3