Emacs: Remove old browser-url settings, use xdg-open instead.
parent
d3f7e17c38
commit
95bc305917
|
@ -147,22 +147,7 @@
|
|||
;; "s-w" 'other-window
|
||||
"s-c" 'delete-window)
|
||||
|
||||
;; REVIEW: If xdg-open is not found, set Emacs URL browser to the environment browser,
|
||||
;; or w3m if BROWSER is not set.
|
||||
;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18986.
|
||||
;; In Emacs 26, the BROWSER variable is still not checked.
|
||||
(require 'browse-url)
|
||||
(setq browse-url-generic-program (or
|
||||
(executable-find (or (getenv "BROWSER") ""))
|
||||
(when (executable-find "xdg-mime")
|
||||
(let ((desktop-browser (ambrevar/call-process-to-string "xdg-mime" "query" "default" "text/html")))
|
||||
(substring desktop-browser 0 (string-match "\\.desktop" desktop-browser))))
|
||||
(executable-find browse-url-mozilla-program)
|
||||
(executable-find browse-url-firefox-program)
|
||||
(executable-find browse-url-chromium-program)
|
||||
(executable-find browse-url-kde-program)
|
||||
(executable-find browse-url-conkeror-program)
|
||||
(executable-find browse-url-chrome-program)))
|
||||
(setq browse-url-browser-function '(;; TODO: Display hyperspec in other window.
|
||||
("http://www.lispworks.com/reference/HyperSpec/.*" . eww-browse-url)
|
||||
("file:///.*HyperSpec.*" . eww-browse-url)
|
||||
|
|
Loading…
Reference in New Issue