Use dired-open also on Windows

There, use the standard utilities supplied by Emacs to open files externally,
but otherwise rely on dired-open to find the right way to open them.
Daniel Borchmann 2020-12-20 18:03:14 +01:00
parent 6d3dada560
commit 41e79fa130
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 4 additions and 3 deletions

View File

@ -1978,14 +1978,15 @@
(require 'dired-x)
(with-demoted-errors "Non-Fatal Errors (dired-open): %s"
(require 'dired-open))
(if (eq system-type 'windows-nt)
(with-demoted-errors "Non-Fatal Error (w32-browser): %s"
(require 'w32-browser)
(bind-key "M-RET" #'dired-w32-browser dired-mode-map)
(bind-key "<C-return>" #'dired-w32explore dired-mode-map))
(with-demoted-errors "Non-Fatal Errors (dired-open): %s"
(require 'dired-open)
(bind-key "M-RET" #'dired-open-xdg dired-mode-map)))
(bind-key "M-RET" #'dired-open-xdg dired-mode-map))
(with-demoted-errors "Non-Fatal Errors (dired-recent): %s"
(dired-recent-mode +1))