diff options
author | Case Duckworth | 2022-01-04 00:39:03 -0600 |
---|---|---|
committer | Case Duckworth | 2022-01-04 00:39:03 -0600 |
commit | 43f693d750e0b5d8b1f3ba2a5c37469b004c2027 (patch) | |
tree | 639b5db1a86f588e3ccc476503a87b9d9249c0c9 | |
parent | Don't confirm anything with pdf-tools-install (diff) | |
download | emacs-43f693d750e0b5d8b1f3ba2a5c37469b004c2027.tar.gz emacs-43f693d750e0b5d8b1f3ba2a5c37469b004c2027.zip |
Remove el-patch on setup
Setup 1.2 (I'm pretty sure) removed the `ensure-function' and `ensure-kbd' functions, instead using an `:ensure' keyword in `setup-define'. This makes it way harder to /not/ ensure things when I don't want them, so I just have to use regular elisp when I want to do something funky. Oh well.
-rw-r--r-- | early-init.el | 8 | ||||
-rw-r--r-- | lisp/+setup.el | 25 |
2 files changed, 4 insertions, 29 deletions
diff --git a/early-init.el b/early-init.el index da5d73c..02f92c2 100644 --- a/early-init.el +++ b/early-init.el | |||
@@ -123,11 +123,11 @@ See `no-littering' for examples.") | |||
123 | (require pkg) | 123 | (require pkg) |
124 | (require (intern (format "+%s" pkg)) nil :noerror)) | 124 | (require (intern (format "+%s" pkg)) nil :noerror)) |
125 | 125 | ||
126 | ;;; Appendix | 126 | ;; Setup `setup' |
127 | |||
128 | (add-to-list 'setup-modifier-list 'setup-wrap-to-demote-errors) | ||
127 | 129 | ||
128 | ;; I've patched setup to look at `setup-ensure-function-inhibit' to decide | 130 | ;;; Appendix |
129 | ;; whether to ensure functions or not with local macros. | ||
130 | (setq setup-ensure-function-inhibit t) | ||
131 | 131 | ||
132 | ;; Get rid of a dumb alias. straight-ಠ_ಠ-mode really slows down all | 132 | ;; Get rid of a dumb alias. straight-ಠ_ಠ-mode really slows down all |
133 | ;; minibuffer completion functions. Since it's a (rarely-used, even) | 133 | ;; minibuffer completion functions. Since it's a (rarely-used, even) |
diff --git a/lisp/+setup.el b/lisp/+setup.el index ac99c1f..c6bcb9e 100644 --- a/lisp/+setup.el +++ b/lisp/+setup.el | |||
@@ -24,31 +24,6 @@ | |||
24 | (require 'setup) | 24 | (require 'setup) |
25 | (require 'straight) | 25 | (require 'straight) |
26 | 26 | ||
27 | ;; I don't like the "magic" `setup' performs to ensure a symbol is a | ||
28 | ;; function in `:global', `:bind', `:hook', `:hook-into', and others. | ||
29 | ;; So here, I'll just make it return the symbol unmodified. | ||
30 | (el-patch-feature setup) | ||
31 | (with-eval-after-load 'setup | ||
32 | (el-patch-defvar | ||
33 | (el-patch-add setup-ensure-function-inhibit nil | ||
34 | "Whether to inhibit `setup-ensure-function'.")) | ||
35 | (el-patch-defun setup-ensure-function (sexp) | ||
36 | (el-patch-concat | ||
37 | "Attempt to return SEXP as a quoted function name." | ||
38 | (el-patch-add | ||
39 | "\nIf `setup-ensure-function-inhibit' is non-nil, just return SEXP.")) | ||
40 | (el-patch-wrap 3 0 | ||
41 | (if (and setup-ensure-function-inhibit | ||
42 | (not (eq sexp (setup-get 'mode)))) | ||
43 | sexp | ||
44 | (cond ((eq (car-safe sexp) 'function) | ||
45 | sexp) | ||
46 | ((eq (car-safe sexp) 'quote) | ||
47 | `#',(cadr sexp)) | ||
48 | ((symbolp sexp) | ||
49 | `#',sexp) | ||
50 | (sexp)))))) | ||
51 | |||
52 | (setup-define :face | 27 | (setup-define :face |
53 | (lambda (face spec) | 28 | (lambda (face spec) |
54 | `(custom-set-faces '(,face ,spec 'now "Customized by `setup'."))) | 29 | `(custom-set-faces '(,face ,spec 'now "Customized by `setup'."))) |