diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-12 11:57:32 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-12 11:57:48 -0500 |
commit | 6d024ae867ced056f9ca1206f178720ba5390213 (patch) | |
tree | 682a009aac3a41e57a045718d0af2744892a2cfa /lisp/filesets.el | |
parent | 8ea2f84402453103829c8ba269e4038f6e72ebc6 (diff) | |
download | emacs-6d024ae867ced056f9ca1206f178720ba5390213.tar.gz |
* lisp/filesets.el: Address byte-compiler warning
(filesets-run-cmd): Let-bind `filesets--files`.
(filesets-cmd-isearch-getargs): Use it.
Diffstat (limited to 'lisp/filesets.el')
-rw-r--r-- | lisp/filesets.el | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/lisp/filesets.el b/lisp/filesets.el index a51b6f81358..8e9fae80f69 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -1183,7 +1183,7 @@ Return full path if FULL-FLAG is non-nil." (constraint-flag (message "Obsolete :constraint-flag %S, use :constraintp instead" (cadr constraint-flag)) - (eval (cadr constraint-flag))) + (eval (cadr constraint-flag) t)) (t t)))) @@ -1557,18 +1557,20 @@ Replace <file-name> or <<file-name>> with filename." (completing-read "Select fileset: " filesets-data nil t)))) (when (and cmd-name name) (let* ((event (if (equal cmd-name "Grep <<selection>>") - 'on-grep + 'on-grep 'on-cmd)) (files (if (and fileset - (or (equal mode ':ingroup) - (equal mode ':tree))) + (or (equal mode :ingroup) + (equal mode :tree))) (filesets-get-filelist fileset mode event) - (filesets-get-filelist - (filesets-get-fileset-from-name name) - mode event)))) + (filesets-get-filelist + (filesets-get-fileset-from-name name) + mode event)))) (when files (let ((fn (filesets-cmd-get-fn cmd-name)) - (args (filesets-cmd-get-args cmd-name))) + (args + (dlet ((filesets--files files)) + (filesets-cmd-get-args cmd-name)))) (if (memq fn '(multi-isearch-files multi-isearch-files-regexp)) (apply fn args) (dolist (this files nil) @@ -1577,28 +1579,27 @@ Replace <file-name> or <<file-name>> with filename." (let ((buffer (filesets-find-file this))) (when buffer (goto-char (point-min)) - (progn - (cond - ((stringp fn) - (let* ((args - (mapconcat - (lambda (this) - (filesets-run-cmd--repl-fn - this - (lambda (this) - (format "%s" this)))) - args - " ")) - (cmd (concat fn " " args))) - (filesets-cmd-show-result - cmd (shell-command-to-string cmd)))) - ((symbolp fn) - (apply fn - (mapcan (lambda (this) - (filesets-run-cmd--repl-fn - this - 'list)) - args))))))))))))))))) + (cond + ((stringp fn) + (let* ((args + (mapconcat + (lambda (this) + (filesets-run-cmd--repl-fn + this + (lambda (this) + (format "%s" this)))) + args + " ")) + (cmd (concat fn " " args))) + (filesets-cmd-show-result + cmd (shell-command-to-string cmd)))) + ((symbolp fn) + (apply fn + (mapcan (lambda (this) + (filesets-run-cmd--repl-fn + this + 'list)) + args)))))))))))))))) (defun filesets-get-cmd-menu () "Create filesets command menu." @@ -1624,7 +1625,7 @@ Replace <file-name> or <<file-name>> with filename." (defun filesets-cmd-isearch-getargs () "Get arguments for `multi-isearch-files' and `multi-isearch-files-regexp'." - (and (boundp 'files) (list files))) + (and (boundp 'filesets--files) (list filesets--files))) (defun filesets-cmd-shell-command-getargs () "Get arguments for `filesets-cmd-shell-command'." |