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

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

[elpa] master 0165eda: Add a FILE argument to `el-search-dired-marked-fi


From: Michael Heerdegen
Subject: [elpa] master 0165eda: Add a FILE argument to `el-search-dired-marked-files'
Date: Fri, 27 Jan 2017 04:24:31 +0000 (UTC)

branch: master
commit 0165eda3d74a2dd038c508af3f85b2b3679ac41d
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    Add a FILE argument to `el-search-dired-marked-files'
    
    Make `el-search-dired-marked-files' accept the list of marked files as
    an argument and compute the list in the interactive spec instead of
    the body so that repeating the command from the history works as
    expected (i.e. uses the same file list).
---
 packages/el-search/el-search.el |   23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index e9bd684..0bda729 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -1815,22 +1815,23 @@ are ignored."
 (declare-function dired-get-marked-files "dired")
 
 ;;;###autoload
-(defun el-search-dired-marked-files (pattern &optional recursively)
+(defun el-search-dired-marked-files (pattern files &optional recursively)
   "El-search marked files and directories in dired.
 With RECURSIVELY given (the prefix arg in an interactive call),
 search directories recursively."
-  (interactive (list (el-search--read-pattern-for-interactive) 
current-prefix-arg))
+  (interactive (list (el-search--read-pattern-for-interactive)
+                     (dired-get-marked-files)
+                     current-prefix-arg))
   (el-search-setup-search
    pattern
-   (let ((files (dired-get-marked-files)))
-     (lambda ()
-       (stream-concatenate
-        (seq-map
-         (lambda (file)
-           (if (file-directory-p file)
-               (el-search-stream-of-directory-files file recursively)
-             (stream (list file))))
-         (stream files)))))))
+   (lambda ()
+     (stream-concatenate
+      (seq-map
+       (lambda (file)
+         (if (file-directory-p file)
+             (el-search-stream-of-directory-files file recursively)
+           (stream (list file))))
+       (stream files))))))
 
 
 ;;;; Query-replace



reply via email to

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