;;; 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