summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2022-02-16 23:19:11 -0600
committerCase Duckworth2022-02-16 23:19:11 -0600
commitdbe26df4d459201e3d9f0190b124f7d5a6cefabb (patch)
tree66e03aadfcc6fba0be3acf0214ae97bf5943a371 /lisp
parentUnrequire `dash' (diff)
downloademacs-dbe26df4d459201e3d9f0190b124f7d5a6cefabb.tar.gz
emacs-dbe26df4d459201e3d9f0190b124f7d5a6cefabb.zip
Uh
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+browse-url.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/+browse-url.el b/lisp/+browse-url.el index dee1466..68fb7b0 100644 --- a/lisp/+browse-url.el +++ b/lisp/+browse-url.el
@@ -11,15 +11,18 @@
11 11
12;;; URL Handlers 12;;; URL Handlers
13 13
14(defun +browse-url-set-handlers (handlers) 14(defun +browse-url-set-handlers (&optional handlers)
15 "Set handlers for `browse-url'. 15 "Set HANDLERS for `browse-url'.
16Set `browse-url-handlers', if they exist; else 16Set `browse-url-handlers', if they exist; else
17`browse-url-browser-function'. The reason for this switch is 17`browse-url-browser-function'. The reason for this switch is
18that the latter is deprecated in Emacs 28+." 18that the latter is deprecated in Emacs 28+.
19 (set-default (if (boundp 'browse-url-handlers) 19
20 'browse-url-handlers 20If HANDLERS is absent or nil, recompute handlers. This can be
21 'browse-url-browser-function) 21useful when changing the default browser."
22 handlers)) 22 (let ((h (if (boundp 'browse-url-handlers)
23 'browse-url-handlers
24 'browse-url-browser-function)))
25 (set-default h (or handlers (symbol-value h)))))
23 26
24(cl-defmacro +browse-url-make-external-viewer-handler 27(cl-defmacro +browse-url-make-external-viewer-handler
25 (viewer default-args &optional (prompt "URL: ") 28 (viewer default-args &optional (prompt "URL: ")