*** New command 'dired-do-eww'.
This command visits the file on the current line with EWW.
+---
+*** 'browse-url-of-dired-file' can now call the secondary browser.
+When invoked with a prefix arg, this will now call
+'browse-url-secondary-browser-function' instead of the default
+browser. 'browse-url-of-dired-file' is bound to 'W' by default in
+dired mode.
+
---
*** New user option 'dired-omit-lines'.
This is used by 'dired-omit-mode', and now allows you to hide based on
(&optional localp no-error-if-not-filep))
;;;###autoload
-(defun browse-url-of-dired-file ()
- "In Dired, ask a WWW browser to display the file named on this line."
- (interactive)
+(defun browse-url-of-dired-file (&optional secondary)
+ "In Dired, ask a WWW browser to display the file named on this line.
+With prefix arg, use the secondary browser instead (e.g. EWW if
+`browse-url-secondary-browser-function' is set to
+`eww-browse-url'."
+ (interactive "P")
(let ((tem (dired-get-filename t t))
+ (browse-url-browser-function
+ (if secondary
+ browse-url-secondary-browser-function
+ browse-url-browser-function))
;; Some URL handlers open files in Emacs. We want to always
;; open in a browser, so disable those.
(browse-url-default-handlers nil))