about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2022-01-04 00:39:03 -0600
committerCase Duckworth2022-01-04 00:39:03 -0600
commit43f693d750e0b5d8b1f3ba2a5c37469b004c2027 (patch)
tree639b5db1a86f588e3ccc476503a87b9d9249c0c9 /lisp
parentDon't confirm anything with pdf-tools-install (diff)
downloademacs-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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+setup.el25
1 files changed, 0 insertions, 25 deletions
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'.")))