[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8816b4f3429: * lisp/dired-aux.el (dired-do-open): Optimize (bug#7
From: |
Juri Linkov |
Subject: |
master 8816b4f3429: * lisp/dired-aux.el (dired-do-open): Optimize (bug#73004). |
Date: |
Thu, 19 Sep 2024 02:15:32 -0400 (EDT) |
branch: master
commit 8816b4f342983468d49f93decf216151e9c6ffbc
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
* lisp/dired-aux.el (dired-do-open): Optimize (bug#73004).
Detect system-type only once, then iterate over files
for every system type separately.
---
lisp/dired-aux.el | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 1d0e29b8782..15bd5c407b9 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1470,17 +1470,21 @@ system is determined by `shell-command-guess-open'."
(equal command "start"))
(setq command "open"))
(if command
- (dolist (file files)
- (cond
- ((memq system-type '(ms-dos))
- (shell-command (concat command " " (shell-quote-argument file))))
- ((memq system-type '(windows-nt))
- (w32-shell-execute command (convert-standard-filename file)))
- ((memq system-type '(cygwin))
- (call-process command nil nil nil file))
- ((memq system-type '(darwin))
- (start-process (concat command " " file) nil command file))
- (t
+ (cond
+ ((memq system-type '(ms-dos))
+ (dolist (file files)
+ (shell-command (concat command " " (shell-quote-argument file)))))
+ ((memq system-type '(windows-nt))
+ (dolist (file files)
+ (w32-shell-execute command (convert-standard-filename file))))
+ ((memq system-type '(cygwin))
+ (dolist (file files)
+ (call-process command nil nil nil file)))
+ ((memq system-type '(darwin))
+ (dolist (file files)
+ (start-process (concat command " " file) nil command file)))
+ (t
+ (dolist (file files)
(call-process command nil 0 nil file))))
(error "Open not supported on this system"))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8816b4f3429: * lisp/dired-aux.el (dired-do-open): Optimize (bug#73004).,
Juri Linkov <=