From 59a1f58695d09ab29ddf992b2c0711c94a4039ea Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 3 Jan 2023 23:03:03 -0600 Subject: Switch to use-package --- lisp/+custom.el | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 lisp/+custom.el (limited to 'lisp/+custom.el') diff --git a/lisp/+custom.el b/lisp/+custom.el deleted file mode 100644 index ba4c55d..0000000 --- a/lisp/+custom.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; +custom.el -*- lexical-binding: t -*- - -(require 'cl-lib) -(require 'seq) - -(defgroup +custom nil - "Group for extra `customize' customizations." - :group 'customize) - -(defcustom +custom-allowed-variables nil - "Variables to load during `+custom-load-some-customizations'." - :type '(repeat symbol)) - -(defcustom +custom-allowed-faces nil - "Faces to load during `+custom-load-some-customziations'." - :type '(repeat face)) - -(defun +custom--filter-list (customlist allowlist) - "Filter CUSTOMLIST to only include those items in ALLOWLIST. -Each item in ALLOWLIST will be compared using `eq' to the `car' -of each item in CUSTOMLIST. Items in CUSTOMLIST not included in -ALLOWLIST will be removed from the return value." - (seq-filter (lambda (el) (memq (car el) allowlist)) - customlist)) - -(defcustom +custom-after-load-hook nil - "Hook run after loading the custom file." - :type 'hook) - -(defun +custom-load-some-customizations (&optional noerror - nomessage - nosuffix - must-suffix) - "Load `custom-file', ignoring most customizations. -Only faces included in `+custom-allowed-faces' and variables -included in `+custom-allowed-variables' will be loaded. - -All optional arguments---NOERROR, NOMESSAGE, NOSUFFIX, -MUST-SUFFIX---are passed to `load', which see." - (cl-letf (((symbol-function 'custom-set-faces) - (lambda (&rest args) - (apply #'custom-theme-set-faces 'user - (+custom--filter-list args +custom-allowed-faces)))) - ((symbol-function 'custom-set-variables) - (lambda (&rest args) - (apply #'custom-theme-set-variables 'user - (+custom--filter-list args +custom-allowed-variables))))) - (load custom-file noerror nomessage nosuffix must-suffix)) - (run-hooks '+custom-after-load-hook)) - -(provide '+custom) -;;; +custom.el ends here -- cgit 1.4.1-21-gabe81