mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-28 01:00:52 -07:00
* lisp/dired-aux.el (dired-do-open): Optimize (bug#73004).
Detect system-type only once, then iterate over files for every system type separately.
This commit is contained in:
parent
ae4171efdc
commit
8816b4f342
1 changed files with 15 additions and 11 deletions
|
|
@ -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"))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue