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.
This commit is contained in:
parent
a67110aefa
commit
43f693d750
|
@ -123,11 +123,11 @@ See `no-littering' for examples.")
|
||||||
(require pkg)
|
(require pkg)
|
||||||
(require (intern (format "+%s" pkg)) nil :noerror))
|
(require (intern (format "+%s" pkg)) nil :noerror))
|
||||||
|
|
||||||
;;; Appendix
|
;; Setup `setup'
|
||||||
|
|
||||||
;; I've patched setup to look at `setup-ensure-function-inhibit' to decide
|
(add-to-list 'setup-modifier-list 'setup-wrap-to-demote-errors)
|
||||||
;; whether to ensure functions or not with local macros.
|
|
||||||
(setq setup-ensure-function-inhibit t)
|
;;; Appendix
|
||||||
|
|
||||||
;; Get rid of a dumb alias. straight-ಠ_ಠ-mode really slows down all
|
;; Get rid of a dumb alias. straight-ಠ_ಠ-mode really slows down all
|
||||||
;; minibuffer completion functions. Since it's a (rarely-used, even)
|
;; minibuffer completion functions. Since it's a (rarely-used, even)
|
||||||
|
|
|
@ -24,31 +24,6 @@
|
||||||
(require 'setup)
|
(require 'setup)
|
||||||
(require 'straight)
|
(require 'straight)
|
||||||
|
|
||||||
;; I don't like the "magic" `setup' performs to ensure a symbol is a
|
|
||||||
;; function in `:global', `:bind', `:hook', `:hook-into', and others.
|
|
||||||
;; So here, I'll just make it return the symbol unmodified.
|
|
||||||
(el-patch-feature setup)
|
|
||||||
(with-eval-after-load 'setup
|
|
||||||
(el-patch-defvar
|
|
||||||
(el-patch-add setup-ensure-function-inhibit nil
|
|
||||||
"Whether to inhibit `setup-ensure-function'."))
|
|
||||||
(el-patch-defun setup-ensure-function (sexp)
|
|
||||||
(el-patch-concat
|
|
||||||
"Attempt to return SEXP as a quoted function name."
|
|
||||||
(el-patch-add
|
|
||||||
"\nIf `setup-ensure-function-inhibit' is non-nil, just return SEXP."))
|
|
||||||
(el-patch-wrap 3 0
|
|
||||||
(if (and setup-ensure-function-inhibit
|
|
||||||
(not (eq sexp (setup-get 'mode))))
|
|
||||||
sexp
|
|
||||||
(cond ((eq (car-safe sexp) 'function)
|
|
||||||
sexp)
|
|
||||||
((eq (car-safe sexp) 'quote)
|
|
||||||
`#',(cadr sexp))
|
|
||||||
((symbolp sexp)
|
|
||||||
`#',sexp)
|
|
||||||
(sexp))))))
|
|
||||||
|
|
||||||
(setup-define :face
|
(setup-define :face
|
||||||
(lambda (face spec)
|
(lambda (face spec)
|
||||||
`(custom-set-faces '(,face ,spec 'now "Customized by `setup'.")))
|
`(custom-set-faces '(,face ,spec 'now "Customized by `setup'.")))
|
||||||
|
|
Loading…
Reference in New Issue