blob: 080cd9a67efd233a91780b21eed3cb89dfd8f0b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
;;; acdw.web.el --- Web browsing and such -*- lexical-binding: t; -*-
;;; Code:
(defcustom +browse-url-other-safe-browser-functions nil
"Other safe browser functions."
:type '(repeat function))
(defun +browse-url-browser-function-safe-p (f)
"Return t if F is a safe browser function."
(memq f (append +browse-url-other-safe-browser-functions
(mapcar (lambda (i)
(plist-get (cdr i) :value))
(seq-filter (lambda (i)
(eq (car i) 'function-item))
(cdr (get 'browse-url-browser-function
'custom-type)))))))
;;; Packages
(use-package browse-url
:config
(put 'browse-url-browser-function 'safe-local-variable
'+browse-url-browser-function-safe-p))
(provide 'acdw-web)
;;; acdw-web.el ends here
|