summaryrefslogtreecommitdiff
path: root/helm-bookmark.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2018-03-23 07:53:34 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2018-03-23 07:53:34 +0100
commit6f80bbcbf86f30ee827002189d86ffd962041180 (patch)
treea17c7016b343d11005d5c490a3cbf2eb2d2e6cac /helm-bookmark.el
parentcb70b3493df204676f9a678f658bbe1e3a3b4a8b (diff)
Use w3m-browse-url when available in w3m bmks handler
* helm-bookmark.el (helm-bookmark-jump-w3m): Do it.
Diffstat (limited to 'helm-bookmark.el')
-rw-r--r--helm-bookmark.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/helm-bookmark.el b/helm-bookmark.el
index a6cf51b3..842d4933 100644
--- a/helm-bookmark.el
+++ b/helm-bookmark.el
@@ -287,11 +287,18 @@ BOOKMARK is a bookmark name or a bookmark record."
If `browse-url-browser-function' is set to something else
than `w3m-browse-url' use it."
(require 'helm-net)
- (let ((file (or (bookmark-prop-get bookmark 'filename)
- (bookmark-prop-get bookmark 'url)))
- (buf (generate-new-buffer-name "*w3m*"))
- (w3m-async-exec nil)
- (really-use-w3m (equal browse-url-browser-function 'w3m-browse-url)))
+ (let* ((file (or (bookmark-prop-get bookmark 'filename)
+ (bookmark-prop-get bookmark 'url)))
+ (buf (generate-new-buffer-name "*w3m*"))
+ (w3m-async-exec nil)
+ ;; If user don't have anymore w3m installed let it browse its
+ ;; bookmarks with default browser otherwise assume bookmark
+ ;; have been bookmarked from w3m and use w3m.
+ (browse-url-browser-function (or (and (fboundp 'w3m-browse-url)
+ (executable-find "w3m")
+ 'w3m-browse-url)
+ browse-url-browser-function))
+ (really-use-w3m (equal browse-url-browser-function 'w3m-browse-url)))
(helm-browse-url file really-use-w3m)
(when really-use-w3m
(bookmark-default-handler