summary refs log tree commit diff stats
path: root/lisp/acdw-web.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/acdw-web.el')
-rw-r--r--lisp/acdw-web.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/lisp/acdw-web.el b/lisp/acdw-web.el new file mode 100644 index 0000000..080cd9a --- /dev/null +++ b/lisp/acdw-web.el
@@ -0,0 +1,28 @@
1;;; acdw.web.el --- Web browsing and such -*- lexical-binding: t; -*-
2
3;;; Code:
4
5(defcustom +browse-url-other-safe-browser-functions nil
6 "Other safe browser functions."
7 :type '(repeat function))
8
9(defun +browse-url-browser-function-safe-p (f)
10 "Return t if F is a safe browser function."
11 (memq f (append +browse-url-other-safe-browser-functions
12 (mapcar (lambda (i)
13 (plist-get (cdr i) :value))
14 (seq-filter (lambda (i)
15 (eq (car i) 'function-item))
16 (cdr (get 'browse-url-browser-function
17 'custom-type)))))))
18
19
20;;; Packages
21
22(use-package browse-url
23 :config
24 (put 'browse-url-browser-function 'safe-local-variable
25 '+browse-url-browser-function-safe-p))
26
27(provide 'acdw-web)
28;;; acdw-web.el ends here