Skip to content

Instantly share code, notes, and snippets.

@zzamboni
Created April 26, 2021 09:41
Show Gist options
  • Save zzamboni/32098a3d96d731c7f69dd2ac64b3b5d7 to your computer and use it in GitHub Desktop.
Save zzamboni/32098a3d96d731c7f69dd2ac64b3b5d7 to your computer and use it in GitHub Desktop.
# -*- lisp-interaction -*-
# vim: set ft=lisp:
(void-variable comp-ctxt)
(type-of comp-ctxt)
(memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags)
(and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)
(progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t))
(or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt)))
(progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt))) (aref comp-ctxt 5))
(if range (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt))) (aref comp-ctxt 5)) (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt))) (aref comp-ctxt 4)))
(let* ((mem-h (if range (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt))) (aref comp-ctxt 5)) (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt))) (aref comp-ctxt 4)))) (res (or (gethash srcs mem-h) (puthash (mapcar #'comp-cstr-copy srcs) (apply #'comp-cstr-union-1-no-mem range srcs) mem-h)))) (progn (progn (or (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr dst))) (let* ((v dst)) (aset v 1 (progn (or (progn (and (memq (type-of res) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr res))) (aref res 1))))) (progn (or (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr dst))) (let* ((v dst)) (aset v 2 (progn (or (progn (and (memq (type-of res) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr res))) (aref res 2))))) (progn (or (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr dst))) (let* ((v dst)) (aset v 3 (progn (or (progn (and (memq (type-of res) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr res))) (aref res 3))))) (progn (or (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr dst))) (let* ((v dst)) (aset v 4 (progn (or (progn (and (memq (type-of res) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr res))) (aref res 4)))))) res)
(comp-cstr-union-1 t #s(comp-cstr (t) nil nil nil) #s(comp-cstr (number) nil nil nil) #s(comp-cstr (marker) nil nil nil))
(apply comp-cstr-union-1 t #s(comp-cstr (t) nil nil nil) (#s(comp-cstr (number) nil nil nil) #s(comp-cstr (marker) nil nil nil)))
(comp-cstr-union #s(comp-cstr (t) nil nil nil) #s(comp-cstr (number) nil nil nil) #s(comp-cstr (marker) nil nil nil))
(apply comp-cstr-union #s(comp-cstr (t) nil nil nil) (#s(comp-cstr (number) nil nil nil) #s(comp-cstr (marker) nil nil nil)))
(comp-cstr-union-make #s(comp-cstr (number) nil nil nil) #s(comp-cstr (marker) nil nil nil))
(apply comp-cstr-union-make (#s(comp-cstr (number) nil nil nil) #s(comp-cstr (marker) nil nil nil)))
(let ((rest x17)) (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest)))
(let* ((x17 (cdr-safe type-spec))) (let ((rest x17)) (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))
(cond ((eq x16 'or) (let* ((x17 (cdr-safe type-spec))) (let ((rest x17)) (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'and) (let* ((x18 (cdr-safe type-spec))) (let ((rest x18)) (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'not) (let* ((x19 (cdr-safe type-spec))) (if (consp x19) (let* ((x20 (car-safe x19)) (x21 (cdr-safe x19))) (if (null x21) (let ((cstr x20)) (comp-cstr-negation-make (comp-type-spec-to-cstr cstr))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'integer) (let* ((x22 (cdr-safe type-spec))) (if (consp x22) (let* ((x23 (car-safe x22))) (cond ((integerp x23) (let* ((x24 (cdr-safe x22))) (if (consp x24) (let* ((x25 (car-safe x24))) (cond ((integerp x25) (let* ((x26 (cdr-safe x24))) (if (null x26) (let ((l x23) (h x25)) (comp-irange-to-cstr (cons l h))) (let nil (error "Invalid type specifier"))))) ((eq x25 '*) (let* ((x27 (cdr-safe x24))) (if (null x27) (let ((l x23)) (comp-irange-to-cstr (cons l '+))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x23 '*) (let* ((x28 (cdr-safe x22))) (if (consp x28) (let* ((x29 (car-safe x28))) (if (integerp x29) (let* ((x30 (cdr-safe x28))) (if (null x30) (let ((h x29)) (comp-irange-to-cstr (cons '- h))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x16 'float) (let* ((x31 (cdr-safe type-spec))) (if (consp x31) (let* ((x32 (car-safe x31))) (if (comp-star-or-num-p x32) (let* ((x33 (cdr-safe x31))) (if (consp x33) (let* ((x34 (car-safe x33))) (if (comp-star-or-num-p x34) (let* ((x35 (cdr-safe x33))) (if (null x35) (let nil (comp-type-to-cstr 'float)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'member) (let* ((x36 (cdr-safe type-spec))) (let ((rest x36)) (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x16 'function) (let* ((x37 (cdr-safe type-spec))) (if (consp x37) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))
(let* ((x16 (car-safe type-spec))) (cond ((eq x16 'or) (let* ((x17 (cdr-safe type-spec))) (let ((rest x17)) (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'and) (let* ((x18 (cdr-safe type-spec))) (let ((rest x18)) (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'not) (let* ((x19 (cdr-safe type-spec))) (if (consp x19) (let* ((x20 (car-safe x19)) (x21 (cdr-safe x19))) (if (null x21) (let ((cstr x20)) (comp-cstr-negation-make (comp-type-spec-to-cstr cstr))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'integer) (let* ((x22 (cdr-safe type-spec))) (if (consp x22) (let* ((x23 (car-safe x22))) (cond ((integerp x23) (let* ((x24 (cdr-safe x22))) (if (consp x24) (let* ((x25 (car-safe x24))) (cond ((integerp x25) (let* ((x26 (cdr-safe x24))) (if (null x26) (let ((l x23) (h x25)) (comp-irange-to-cstr (cons l h))) (let nil (error "Invalid type specifier"))))) ((eq x25 '*) (let* ((x27 (cdr-safe x24))) (if (null x27) (let ((l x23)) (comp-irange-to-cstr (cons l '+))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x23 '*) (let* ((x28 (cdr-safe x22))) (if (consp x28) (let* ((x29 (car-safe x28))) (if (integerp x29) (let* ((x30 (cdr-safe x28))) (if (null x30) (let ((h x29)) (comp-irange-to-cstr (cons '- h))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x16 'float) (let* ((x31 (cdr-safe type-spec))) (if (consp x31) (let* ((x32 (car-safe x31))) (if (comp-star-or-num-p x32) (let* ((x33 (cdr-safe x31))) (if (consp x33) (let* ((x34 (car-safe x33))) (if (comp-star-or-num-p x34) (let* ((x35 (cdr-safe x33))) (if (null x35) (let nil (comp-type-to-cstr 'float)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'member) (let* ((x36 (cdr-safe type-spec))) (let ((rest x36)) (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x16 'function) (let* ((x37 (cdr-safe type-spec))) (if (consp x37) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier")))))
(cond ((memq type-spec '(&rest &optional)) (let ((x type-spec)) (if fn x (error "Invalid `%s` in type specifier" x)))) ((null type-spec) (let nil (record 'comp-cstr nil nil nil nil))) ((eq type-spec 'fixnum) (let nil (comp-irange-to-cstr (cons most-negative-fixnum most-positive-fixnum)))) ((eq type-spec 'boolean) (let nil (comp-type-spec-to-cstr '(member t nil)))) ((eq type-spec 'integer) (let nil (comp-irange-to-cstr '(- . +)))) ((eq type-spec 'null) (let nil (comp-value-to-cstr nil))) ((atom type-spec) (let nil (comp-type-to-cstr type-spec))) ((consp type-spec) (let* ((x16 (car-safe type-spec))) (cond ((eq x16 'or) (let* ((x17 (cdr-safe type-spec))) (let ((rest x17)) (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'and) (let* ((x18 (cdr-safe type-spec))) (let ((rest x18)) (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'not) (let* ((x19 (cdr-safe type-spec))) (if (consp x19) (let* ((x20 (car-safe x19)) (x21 (cdr-safe x19))) (if (null x21) (let ((cstr x20)) (comp-cstr-negation-make (comp-type-spec-to-cstr cstr))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'integer) (let* ((x22 (cdr-safe type-spec))) (if (consp x22) (let* ((x23 (car-safe x22))) (cond ((integerp x23) (let* ((x24 (cdr-safe x22))) (if (consp x24) (let* ((x25 (car-safe x24))) (cond ((integerp x25) (let* ((x26 (cdr-safe x24))) (if (null x26) (let ((l x23) (h x25)) (comp-irange-to-cstr (cons l h))) (let nil (error "Invalid type specifier"))))) ((eq x25 '*) (let* ((x27 (cdr-safe x24))) (if (null x27) (let ((l x23)) (comp-irange-to-cstr (cons l '+))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x23 '*) (let* ((x28 (cdr-safe x22))) (if (consp x28) (let* ((x29 (car-safe x28))) (if (integerp x29) (let* ((x30 (cdr-safe x28))) (if (null x30) (let ((h x29)) (comp-irange-to-cstr (cons '- h))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x16 'float) (let* ((x31 (cdr-safe type-spec))) (if (consp x31) (let* ((x32 (car-safe x31))) (if (comp-star-or-num-p x32) (let* ((x33 (cdr-safe x31))) (if (consp x33) (let* ((x34 (car-safe x33))) (if (comp-star-or-num-p x34) (let* ((x35 (cdr-safe x33))) (if (null x35) (let nil (comp-type-to-cstr 'float)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'member) (let* ((x36 (cdr-safe type-spec))) (let ((rest x36)) (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x16 'function) (let* ((x37 (cdr-safe type-spec))) (if (consp x37) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier")))))) (t (let nil (error "Invalid type specifier"))))
(comp-type-spec-to-cstr (or number marker) t)
((closure ((ret . number) (args (or number marker) (or number marker)) (x41) (x40 . number) (x39 number) (x38 (or number marker) (or number marker)) (x37 ((or number marker) (or number marker)) number) (x16 . function) (fn) (type-spec function ((or number marker) (or number marker)) number) cl-struct-comp-cstr-ctxt-tags cl-struct-comp-cstr-f-tags cl-struct-comp-cstr-tags t) (x) (comp-type-spec-to-cstr x t)) (or number marker))
(mapcar (closure ((ret . number) (args (or number marker) (or number marker)) (x41) (x40 . number) (x39 number) (x38 (or number marker) (or number marker)) (x37 ((or number marker) (or number marker)) number) (x16 . function) (fn) (type-spec function ((or number marker) (or number marker)) number) cl-struct-comp-cstr-ctxt-tags cl-struct-comp-cstr-f-tags cl-struct-comp-cstr-tags t) (x) (comp-type-spec-to-cstr x t)) ((or number marker) (or number marker)))
(make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))
(let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret)))
(if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))
(let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier"))))
(if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))
(let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))
(if (consp x37) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))
(let* ((x37 (cdr-safe type-spec))) (if (consp x37) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))
(cond ((eq x16 'or) (let* ((x17 (cdr-safe type-spec))) (let ((rest x17)) (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'and) (let* ((x18 (cdr-safe type-spec))) (let ((rest x18)) (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'not) (let* ((x19 (cdr-safe type-spec))) (if (consp x19) (let* ((x20 (car-safe x19)) (x21 (cdr-safe x19))) (if (null x21) (let ((cstr x20)) (comp-cstr-negation-make (comp-type-spec-to-cstr cstr))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'integer) (let* ((x22 (cdr-safe type-spec))) (if (consp x22) (let* ((x23 (car-safe x22))) (cond ((integerp x23) (let* ((x24 (cdr-safe x22))) (if (consp x24) (let* ((x25 (car-safe x24))) (cond ((integerp x25) (let* ((x26 (cdr-safe x24))) (if (null x26) (let ((l x23) (h x25)) (comp-irange-to-cstr (cons l h))) (let nil (error "Invalid type specifier"))))) ((eq x25 '*) (let* ((x27 (cdr-safe x24))) (if (null x27) (let ((l x23)) (comp-irange-to-cstr (cons l '+))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x23 '*) (let* ((x28 (cdr-safe x22))) (if (consp x28) (let* ((x29 (car-safe x28))) (if (integerp x29) (let* ((x30 (cdr-safe x28))) (if (null x30) (let ((h x29)) (comp-irange-to-cstr (cons '- h))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x16 'float) (let* ((x31 (cdr-safe type-spec))) (if (consp x31) (let* ((x32 (car-safe x31))) (if (comp-star-or-num-p x32) (let* ((x33 (cdr-safe x31))) (if (consp x33) (let* ((x34 (car-safe x33))) (if (comp-star-or-num-p x34) (let* ((x35 (cdr-safe x33))) (if (null x35) (let nil (comp-type-to-cstr 'float)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'member) (let* ((x36 (cdr-safe type-spec))) (let ((rest x36)) (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x16 'function) (let* ((x37 (cdr-safe type-spec))) (if (consp x37) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))
(let* ((x16 (car-safe type-spec))) (cond ((eq x16 'or) (let* ((x17 (cdr-safe type-spec))) (let ((rest x17)) (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'and) (let* ((x18 (cdr-safe type-spec))) (let ((rest x18)) (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'not) (let* ((x19 (cdr-safe type-spec))) (if (consp x19) (let* ((x20 (car-safe x19)) (x21 (cdr-safe x19))) (if (null x21) (let ((cstr x20)) (comp-cstr-negation-make (comp-type-spec-to-cstr cstr))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'integer) (let* ((x22 (cdr-safe type-spec))) (if (consp x22) (let* ((x23 (car-safe x22))) (cond ((integerp x23) (let* ((x24 (cdr-safe x22))) (if (consp x24) (let* ((x25 (car-safe x24))) (cond ((integerp x25) (let* ((x26 (cdr-safe x24))) (if (null x26) (let ((l x23) (h x25)) (comp-irange-to-cstr (cons l h))) (let nil (error "Invalid type specifier"))))) ((eq x25 '*) (let* ((x27 (cdr-safe x24))) (if (null x27) (let ((l x23)) (comp-irange-to-cstr (cons l '+))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x23 '*) (let* ((x28 (cdr-safe x22))) (if (consp x28) (let* ((x29 (car-safe x28))) (if (integerp x29) (let* ((x30 (cdr-safe x28))) (if (null x30) (let ((h x29)) (comp-irange-to-cstr (cons '- h))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x16 'float) (let* ((x31 (cdr-safe type-spec))) (if (consp x31) (let* ((x32 (car-safe x31))) (if (comp-star-or-num-p x32) (let* ((x33 (cdr-safe x31))) (if (consp x33) (let* ((x34 (car-safe x33))) (if (comp-star-or-num-p x34) (let* ((x35 (cdr-safe x33))) (if (null x35) (let nil (comp-type-to-cstr 'float)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'member) (let* ((x36 (cdr-safe type-spec))) (let ((rest x36)) (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x16 'function) (let* ((x37 (cdr-safe type-spec))) (if (consp x37) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier")))))
(cond ((memq type-spec '(&rest &optional)) (let ((x type-spec)) (if fn x (error "Invalid `%s` in type specifier" x)))) ((null type-spec) (let nil (record 'comp-cstr nil nil nil nil))) ((eq type-spec 'fixnum) (let nil (comp-irange-to-cstr (cons most-negative-fixnum most-positive-fixnum)))) ((eq type-spec 'boolean) (let nil (comp-type-spec-to-cstr '(member t nil)))) ((eq type-spec 'integer) (let nil (comp-irange-to-cstr '(- . +)))) ((eq type-spec 'null) (let nil (comp-value-to-cstr nil))) ((atom type-spec) (let nil (comp-type-to-cstr type-spec))) ((consp type-spec) (let* ((x16 (car-safe type-spec))) (cond ((eq x16 'or) (let* ((x17 (cdr-safe type-spec))) (let ((rest x17)) (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'and) (let* ((x18 (cdr-safe type-spec))) (let ((rest x18)) (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x16 'not) (let* ((x19 (cdr-safe type-spec))) (if (consp x19) (let* ((x20 (car-safe x19)) (x21 (cdr-safe x19))) (if (null x21) (let ((cstr x20)) (comp-cstr-negation-make (comp-type-spec-to-cstr cstr))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'integer) (let* ((x22 (cdr-safe type-spec))) (if (consp x22) (let* ((x23 (car-safe x22))) (cond ((integerp x23) (let* ((x24 (cdr-safe x22))) (if (consp x24) (let* ((x25 (car-safe x24))) (cond ((integerp x25) (let* ((x26 (cdr-safe x24))) (if (null x26) (let ((l x23) (h x25)) (comp-irange-to-cstr (cons l h))) (let nil (error "Invalid type specifier"))))) ((eq x25 '*) (let* ((x27 (cdr-safe x24))) (if (null x27) (let ((l x23)) (comp-irange-to-cstr (cons l '+))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x23 '*) (let* ((x28 (cdr-safe x22))) (if (consp x28) (let* ((x29 (car-safe x28))) (if (integerp x29) (let* ((x30 (cdr-safe x28))) (if (null x30) (let ((h x29)) (comp-irange-to-cstr (cons '- h))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier"))))) (let nil (error "Invalid type specifier"))))) ((eq x16 'float) (let* ((x31 (cdr-safe type-spec))) (if (consp x31) (let* ((x32 (car-safe x31))) (if (comp-star-or-num-p x32) (let* ((x33 (cdr-safe x31))) (if (consp x33) (let* ((x34 (car-safe x33))) (if (comp-star-or-num-p x34) (let* ((x35 (cdr-safe x33))) (if (null x35) (let nil (comp-type-to-cstr 'float)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x16 'member) (let* ((x36 (cdr-safe type-spec))) (let ((rest x36)) (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x16 'function) (let* ((x37 (cdr-safe type-spec))) (if (consp x37) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (if (consp x39) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (if (null x41) (let ((args x38) (ret x40)) (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) (t (let nil (error "Invalid type specifier")))))) (t (let nil (error "Invalid type specifier"))))
(comp-type-spec-to-cstr (function ((or number marker) (or number marker)) number))
(setq cstr (comp-type-spec-to-cstr type-spec))
(while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) f (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) type-spec (car --cl-var--)) (setq cstr (comp-type-spec-to-cstr type-spec)) (puthash f cstr h) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil))
(let* ((comp-ctxt (make-comp-cstr-ctxt)) (h (make-hash-table :test #'eq)) (--cl-var-- comp-known-type-specifiers) (f nil) (type-spec nil) (--cl-var--) (cstr nil) (--cl-var-- t)) (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) f (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) type-spec (car --cl-var--)) (setq cstr (comp-type-spec-to-cstr type-spec)) (puthash f cstr h) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) h)
(defconst comp-known-func-cstr-h (let* ((comp-ctxt (make-comp-cstr-ctxt)) (h (make-hash-table :test #'eq)) (--cl-var-- comp-known-type-specifiers) (f nil) (type-spec nil) (--cl-var--) (cstr nil) (--cl-var-- t)) (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) f (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) type-spec (car --cl-var--)) (setq cstr (comp-type-spec-to-cstr type-spec)) (puthash f cstr h) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) h) "Hash table function -> `comp-constraint'.")
(eval-buffer #<buffer *load*-923718> nil "/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.50/lisp/emacs-lisp/comp.el" nil t)
(load-with-code-conversion "/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.50/lisp/emacs-lisp/comp.el" "/usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.50/lisp/emacs-lisp/comp.el" nil t)
(require comp)
(progn (require 'comp) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package))))) (progn (let ((inhibit-message t) (message-log-max nil)) (native-compile-async (straight--build-dir package) 'recursively nil #'straight--native-compile-file-p)) (let* ((x (format "^%s" (straight--build-dir package)))) (if (member x comp-deferred-compilation-deny-list) comp-deferred-compilation-deny-list (setq comp-deferred-compilation-deny-list (cons x comp-deferred-compilation-deny-list)))))))
(if (and (fboundp 'native-compile-async) (member 'straight--build-compile straight--build-functions)) (progn (require 'comp) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package))))) (progn (let ((inhibit-message t) (message-log-max nil)) (native-compile-async (straight--build-dir package) 'recursively nil #'straight--native-compile-file-p)) (let* ((x (format "^%s" (straight--build-dir package)))) (if (member x comp-deferred-compilation-deny-list) comp-deferred-compilation-deny-list (setq comp-deferred-compilation-deny-list (cons x comp-deferred-compilation-deny-list))))))))
(straight--build-native-compile (:type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop" :package "straight" :local-repo "straight.el"))
(run-hook-with-args straight--build-native-compile (:type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop" :package "straight" :local-repo "straight.el"))
(let ((straight--build-functions (straight--build-steps recipe))) (run-hook-with-args 'straight--build-functions recipe))
(progn (straight--run-build-commands recipe) (straight--symlink-package recipe) (straight--compute-dependencies package) (setq straight--echo-area-dirty nil) (let* ((dependencies (and t (straight--get-dependencies package)))) (if dependencies (progn (let ((--dolist-tail-- dependencies)) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil task) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if straight--echo-area-dirty (progn (straight--progress-begin task)))) nil)) (let ((straight--build-functions (straight--build-steps recipe))) (run-hook-with-args 'straight--build-functions recipe)) (straight--run-build-commands recipe 'post) (run-hook-with-args 'straight-use-package-post-build-functions package))
(prog1 (progn (straight--run-build-commands recipe) (straight--symlink-package recipe) (straight--compute-dependencies package) (setq straight--echo-area-dirty nil) (let* ((dependencies (and t (straight--get-dependencies package)))) (if dependencies (progn (let ((--dolist-tail-- dependencies)) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil task) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if straight--echo-area-dirty (progn (straight--progress-begin task)))) nil)) (let ((straight--build-functions (straight--build-steps recipe))) (run-hook-with-args 'straight--build-functions recipe)) (straight--run-build-commands recipe 'post) (run-hook-with-args 'straight-use-package-post-build-functions package)) (if gensym--task-cdr (progn (straight--output "%s...done" gensym--task-cdr))))
(progn (if gensym--task-car (progn (straight--output "%s..." gensym--task-car))) (prog1 (progn (straight--run-build-commands recipe) (straight--symlink-package recipe) (straight--compute-dependencies package) (setq straight--echo-area-dirty nil) (let* ((dependencies (and t (straight--get-dependencies package)))) (if dependencies (progn (let ((--dolist-tail-- dependencies)) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil task) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if straight--echo-area-dirty (progn (straight--progress-begin task)))) nil)) (let ((straight--build-functions (straight--build-steps recipe))) (run-hook-with-args 'straight--build-functions recipe)) (straight--run-build-commands recipe 'post) (run-hook-with-args 'straight-use-package-post-build-functions package)) (if gensym--task-cdr (progn (straight--output "%s...done" gensym--task-cdr)))))
(let* ((gensym--task task) (gensym--task-car (if (listp gensym--task) (car gensym--task) gensym--task)) (gensym--task-cdr (if (listp gensym--task) (cdr gensym--task) gensym--task))) (progn (if gensym--task-car (progn (straight--output "%s..." gensym--task-car))) (prog1 (progn (straight--run-build-commands recipe) (straight--symlink-package recipe) (straight--compute-dependencies package) (setq straight--echo-area-dirty nil) (let* ((dependencies (and t (straight--get-dependencies package)))) (if dependencies (progn (let ((--dolist-tail-- dependencies)) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil task) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if straight--echo-area-dirty (progn (straight--progress-begin task)))) nil)) (let ((straight--build-functions (straight--build-steps recipe))) (run-hook-with-args 'straight--build-functions recipe)) (straight--run-build-commands recipe 'post) (run-hook-with-args 'straight-use-package-post-build-functions package)) (if gensym--task-cdr (progn (straight--output "%s...done" gensym--task-cdr))))))
(let ((task (concat cause (if cause (progn straight-arrow)) (format "Building %s" package)))) (let* ((gensym--task task) (gensym--task-car (if (listp gensym--task) (car gensym--task) gensym--task)) (gensym--task-cdr (if (listp gensym--task) (cdr gensym--task) gensym--task))) (progn (if gensym--task-car (progn (straight--output "%s..." gensym--task-car))) (prog1 (progn (straight--run-build-commands recipe) (straight--symlink-package recipe) (straight--compute-dependencies package) (setq straight--echo-area-dirty nil) (let* ((dependencies (and t (straight--get-dependencies package)))) (if dependencies (progn (let ((--dolist-tail-- dependencies)) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil task) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if straight--echo-area-dirty (progn (straight--progress-begin task)))) nil)) (let ((straight--build-functions (straight--build-steps recipe))) (run-hook-with-args 'straight--build-functions recipe)) (straight--run-build-commands recipe 'post) (run-hook-with-args 'straight-use-package-post-build-functions package)) (if gensym--task-cdr (progn (straight--output "%s...done" gensym--task-cdr)))))) (setq straight--echo-area-dirty t))
(progn (if straight-safe-mode (progn (error "Building %s not allowed in safe mode" package))) (let ((task (concat cause (if cause (progn straight-arrow)) (format "Building %s" package)))) (let* ((gensym--task task) (gensym--task-car (if (listp gensym--task) (car gensym--task) gensym--task)) (gensym--task-cdr (if (listp gensym--task) (cdr gensym--task) gensym--task))) (progn (if gensym--task-car (progn (straight--output "%s..." gensym--task-car))) (prog1 (progn (straight--run-build-commands recipe) (straight--symlink-package recipe) (straight--compute-dependencies package) (setq straight--echo-area-dirty nil) (let* ((dependencies (and t (straight--get-dependencies package)))) (if dependencies (progn (let ((--dolist-tail-- dependencies)) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil task) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if straight--echo-area-dirty (progn (straight--progress-begin task)))) nil)) (let ((straight--build-functions (straight--build-steps recipe))) (run-hook-with-args 'straight--build-functions recipe)) (straight--run-build-commands recipe 'post) (run-hook-with-args 'straight-use-package-post-build-functions package)) (if gensym--task-cdr (progn (straight--output "%s...done" gensym--task-cdr)))))) (setq straight--echo-area-dirty t)))
(let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package))))) (progn (if straight-safe-mode (progn (error "Building %s not allowed in safe mode" package))) (let ((task (concat cause (if cause (progn straight-arrow)) (format "Building %s" package)))) (let* ((gensym--task task) (gensym--task-car (if (listp gensym--task) (car gensym--task) gensym--task)) (gensym--task-cdr (if (listp gensym--task) (cdr gensym--task) gensym--task))) (progn (if gensym--task-car (progn (straight--output "%s..." gensym--task-car))) (prog1 (progn (straight--run-build-commands recipe) (straight--symlink-package recipe) (straight--compute-dependencies package) (setq straight--echo-area-dirty nil) (let* ((dependencies (and t (straight--get-dependencies package)))) (if dependencies (progn (let ((--dolist-tail-- dependencies)) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil task) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if straight--echo-area-dirty (progn (straight--progress-begin task)))) nil)) (let ((straight--build-functions (straight--build-steps recipe))) (run-hook-with-args 'straight--build-functions recipe)) (straight--run-build-commands recipe 'post) (run-hook-with-args 'straight-use-package-post-build-functions package)) (if gensym--task-cdr (progn (straight--output "%s...done" gensym--task-cdr)))))) (setq straight--echo-area-dirty t))))
(straight--build-package (:type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop" :package "straight" :local-repo "straight.el") nil)
(progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))
(if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause)))
(let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package)))))
(let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)
((closure ((type . git) (local-repo . "straight.el") (package . "straight") (--cl-rest-- :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop" :package "straight" :local-repo "straight.el") (recipe :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop" :package "straight" :local-repo "straight.el") (interactive) (cause) (no-build) (no-clone) (melpa-style-recipe straight :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop") straight-symlink-emulation-mode straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-deny-list t) nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))
(funcall (closure ((type . git) (local-repo . "straight.el") (package . "straight") (--cl-rest-- :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop" :package "straight" :local-repo "straight.el") (recipe :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop" :package "straight" :local-repo "straight.el") (interactive) (cause) (no-build) (no-clone) (melpa-style-recipe straight :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop") straight-symlink-emulation-mode straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-deny-list t) nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))
(progn (funcall now))
(if now (progn (funcall now)))
(if (assq id straight--transaction-alist) nil (setq straight--transaction-alist (cons (cons id later) straight--transaction-alist)) (if now (progn (funcall now))))
(progn (if (or manual straight--transaction-alist) nil (straight--transaction-finalize-at-top-level)) (if (assq id straight--transaction-alist) nil (setq straight--transaction-alist (cons (cons id later) straight--transaction-alist)) (if now (progn (funcall now)))))
(progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:now :later :manual :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ':allow-other-keys --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:now :later :manual)" (car --cl-keys--)))))) (progn (if (or manual straight--transaction-alist) nil (straight--transaction-finalize-at-top-level)) (if (assq id straight--transaction-alist) nil (setq straight--transaction-alist (cons (cons id later) straight--transaction-alist)) (if now (progn (funcall now))))))
(let* ((now (car (cdr (plist-member --cl-rest-- ':now)))) (later (car (cdr (plist-member --cl-rest-- ':later)))) (manual (car (cdr (plist-member --cl-rest-- ':manual))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:now :later :manual :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ':allow-other-keys --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:now :later :manual)" (car --cl-keys--)))))) (progn (if (or manual straight--transaction-alist) nil (straight--transaction-finalize-at-top-level)) (if (assq id straight--transaction-alist) nil (setq straight--transaction-alist (cons (cons id later) straight--transaction-alist)) (if now (progn (funcall now)))))))
(straight--transaction-exec use-package-\(:type\ git\ :host\ github\ :repo\ \"raxod502/straight\.el\"\ :files\ \(\"straight*\.el\"\)\ :branch\ \"develop\"\ :package\ \"straight\"\ :local-repo\ \"straight\.el\"\)-nil-nil :now (closure ((type . git) (local-repo . "straight.el") (package . "straight") (--cl-rest-- :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop" :package "straight" :local-repo "straight.el") (recipe :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop" :package "straight" :local-repo "straight.el") (interactive) (cause) (no-build) (no-clone) (melpa-style-recipe straight :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop") straight-symlink-emulation-mode straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-deny-list t) nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))
(progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t))))
(let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))
(let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t))))))
(catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))))
((closure (straight-symlink-emulation-mode straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-deny-list t) (melpa-style-recipe &optional no-clone no-build cause interactive) "Register, clone, build, and activate a package and its dependencies.\nThis is the main entry point to the functionality of straight.el.\n\nMELPA-STYLE-RECIPE is either a symbol naming a package, or a list\nwhose car is a symbol naming a package and whose cdr is a\nproperty list containing e.g. `:type', `:local-repo', `:files',\nand VC backend specific keywords.\n\nFirst, the package recipe is registered with straight.el. If\nNO-CLONE is a function, then it is called with two arguments: the\npackage name as a string, and a boolean value indicating whether\nthe local repository for the package is available. In that case,\nthe return value of the function is used as the value of NO-CLONE\ninstead. In any case, if NO-CLONE is non-nil, then processing\nstops here.\n\nOtherwise, the repository is cloned, if it is missing. If\nNO-BUILD is a function, then it is called with one argument: the\npackage name as a string. In that case, the return value of the\nfunction is used as the value of NO-BUILD instead. In any case,\nif NO-BUILD is non-nil, then processing halts here. Otherwise,\nthe package is built and activated. Note that if the package\nrecipe has a nil `:build' entry, then NO-BUILD is ignored\nand processing always stops before building and activation\noccurs.\n\nCAUSE is a string explaining the reason why\n`straight-use-package' has been called. It is for internal use\nonly, and is used to construct progress messages. INTERACTIVE is\nnon-nil if the function has been called interactively. It is for\ninternal use only, and is used to determine whether to show a\nhint about how to install the package permanently.\n\nReturn non-nil if package was actually installed, and nil\notherwise (this can only happen if NO-CLONE is non-nil)." (interactive (list (straight-get-recipe (if current-prefix-arg (progn 'interactive))) nil nil nil 'interactive)) (catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))))) (straight :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop") nil nil nil nil)
(apply (closure (straight-symlink-emulation-mode straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-deny-list t) (melpa-style-recipe &optional no-clone no-build cause interactive) "Register, clone, build, and activate a package and its dependencies.\nThis is the main entry point to the functionality of straight.el.\n\nMELPA-STYLE-RECIPE is either a symbol naming a package, or a list\nwhose car is a symbol naming a package and whose cdr is a\nproperty list containing e.g. `:type', `:local-repo', `:files',\nand VC backend specific keywords.\n\nFirst, the package recipe is registered with straight.el. If\nNO-CLONE is a function, then it is called with two arguments: the\npackage name as a string, and a boolean value indicating whether\nthe local repository for the package is available. In that case,\nthe return value of the function is used as the value of NO-CLONE\ninstead. In any case, if NO-CLONE is non-nil, then processing\nstops here.\n\nOtherwise, the repository is cloned, if it is missing. If\nNO-BUILD is a function, then it is called with one argument: the\npackage name as a string. In that case, the return value of the\nfunction is used as the value of NO-BUILD instead. In any case,\nif NO-BUILD is non-nil, then processing halts here. Otherwise,\nthe package is built and activated. Note that if the package\nrecipe has a nil `:build' entry, then NO-BUILD is ignored\nand processing always stops before building and activation\noccurs.\n\nCAUSE is a string explaining the reason why\n`straight-use-package' has been called. It is for internal use\nonly, and is used to construct progress messages. INTERACTIVE is\nnon-nil if the function has been called interactively. It is for\ninternal use only, and is used to determine whether to show a\nhint about how to install the package permanently.\n\nReturn non-nil if package was actually installed, and nil\notherwise (this can only happen if NO-CLONE is non-nil)." (interactive (list (straight-get-recipe (if current-prefix-arg (progn 'interactive))) nil nil nil 'interactive)) (catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (straight--build-disabled-p recipe) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))))) ((straight :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop") nil nil nil nil))
(straight-use-package (straight :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "develop"))
(eval-region 3096 5809)
(progn (insert-file-contents (doom-path repo-dir "bootstrap.el")) (eval-region (search-forward "(require 'straight)") (point-max)))
(unwind-protect (progn (insert-file-contents (doom-path repo-dir "bootstrap.el")) (eval-region (search-forward "(require 'straight)") (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (doom-path repo-dir "bootstrap.el")) (eval-region (search-forward "(require 'straight)") (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (doom-path repo-dir "bootstrap.el")) (eval-region (search-forward "(require 'straight)") (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(let ((repo-dir (doom-path straight-base-dir "straight/repos/straight.el")) (repo-url (concat "http" (if gnutls-verify-error "s") "://github.com/" (or (plist-get recipe :repo) "raxod502/straight.el"))) (branch (or (plist-get recipe :branch) straight-repository-branch)) (call (if doom-debug-p #'doom-exec-process #'doom-call-process))) (if (file-directory-p repo-dir) nil (message "Installing straight...") (cond ((eq straight-vc-git-default-clone-depth 'full) (funcall call "git" "clone" "--origin" "origin" repo-url repo-dir)) ((null pin) (funcall call "git" "clone" "--origin" "origin" repo-url repo-dir "--depth" (number-to-string straight-vc-git-default-clone-depth) "--branch" straight-repository-branch "--single-branch" "--no-tags")) ((integerp straight-vc-git-default-clone-depth) (make-directory repo-dir t) (let ((default-directory repo-dir)) (funcall call "git" "init") (funcall call "git" "checkout" "-b" straight-repository-branch) (funcall call "git" "remote" "add" "origin" repo-url) (funcall call "git" "fetch" "origin" pin "--depth" (number-to-string straight-vc-git-default-clone-depth) "--no-tags") (funcall call "git" "checkout" "--detach" pin))))) (require 'straight (concat repo-dir "/straight.el")) (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing recipes" 0 5 (face font-lock-comment-face)))))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (doom-path repo-dir "bootstrap.el")) (eval-region (search-forward "(require 'straight)") (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
(doom--ensure-straight (:host github :repo "raxod502/straight.el" :branch "develop" :local-repo "straight.el" :files ("straight*.el")) "0f9b828d8a41cf3d312678e82573066aebf2ab6e")
(let* ((--cl-rest-- (alist-get 'straight packages)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (pin (car (cdr (plist-member --cl-rest-- ':pin))))) (doom--ensure-straight recipe pin))
(let ((packages (doom-package-list nil 'core))) (let* ((--cl-rest-- (alist-get 'straight packages)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (pin (car (cdr (plist-member --cl-rest-- ':pin))))) (doom--ensure-straight recipe pin)) (doom--ensure-core-packages packages))
(progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing straight" 0 5 (face font-lock-comment-face)))))) (let ((packages (doom-package-list nil 'core))) (let* ((--cl-rest-- (alist-get 'straight packages)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (pin (car (cdr (plist-member --cl-rest-- ':pin))))) (doom--ensure-straight recipe pin)) (doom--ensure-core-packages packages)))
(if (or force-p (null (and (boundp 'straight-recipe-repositories) straight-recipe-repositories))) (progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing straight" 0 5 (face font-lock-comment-face)))))) (let ((packages (doom-package-list nil 'core))) (let* ((--cl-rest-- (alist-get 'straight packages)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (pin (car (cdr (plist-member --cl-rest-- ':pin))))) (doom--ensure-straight recipe pin)) (doom--ensure-core-packages packages))))
(doom-initialize-core-packages)
(eval-buffer #<buffer *load*-112552> nil "/Users/taazadi1/.emacs.d/core/core-cli.el" nil t)
(load-with-code-conversion "/Users/taazadi1/.emacs.d/core/core-cli.el" "/Users/taazadi1/.emacs.d/core/core-cli.el" nil t)
(require core-cli)
(cond ((version< emacs-version "26.3") (princ (concat "Detected Emacs " emacs-version " (at " (car command-line-args) ").\n\n")) (princ "Doom only supports Emacs 26.3 and newer. 27.1 is highly recommended. A guide\n") (princ "to install a newer version of Emacs can be found at:\n\n ") (princ (format "https://doomemacs.org/docs/getting_started.org#%s" (cond ((eq system-type 'darwin) "on-macos") ((memq system-type '(cygwin windows-nt ms-dos)) "on-windows") ("on-linux")))) (princ "Aborting...") 1) ((not (file-readable-p (expand-file-name "core/core.el" user-emacs-directory))) (princ (concat "Couldn't find or read '" (abbreviate-file-name (expand-file-name "core/core.el" user-emacs-directory)) "'.\n\n")) (princ "Are you sure Doom Emacs is correctly installed?\n\n") (if (file-symlink-p load-file-name) (progn (princ "This error can occur if you've symlinked the 'doom' script, which Doom does not\n") (princ "support. Consider symlinking its parent directory instead or explicitly set the\n") (princ "EMACSDIR environment variable, e.g.\n\n ") (princ (if (string-match-p "/fish$" (getenv "SHELL")) "env EMACSDIR=~/.emacs.d doom" "EMACSDIR=~/.emacs.d doom sync")) (princ "\n\n") (princ "Aborting..."))) 2) ((and (equal (user-real-uid) 0) (/= 0 (file-attribute-user-id (file-attributes user-emacs-directory)))) (princ "Do not run this script as root. It will cause file permissions errors later.\n\n") (princ "To carry on anyway, change the owner of your Emacs config to root:\n\n") (princ (concat " chown root:root -R " (abbreviate-file-name user-emacs-directory) "\n\n")) (princ "Aborting...") 3) ((load (expand-file-name "core/core.el" user-emacs-directory) nil t) (require 'core-cli) (apply #'doom-cli-execute :doom (cdr (member "--" argv)))))
(catch 'exit (cond ((version< emacs-version "26.3") (princ (concat "Detected Emacs " emacs-version " (at " (car command-line-args) ").\n\n")) (princ "Doom only supports Emacs 26.3 and newer. 27.1 is highly recommended. A guide\n") (princ "to install a newer version of Emacs can be found at:\n\n ") (princ (format "https://doomemacs.org/docs/getting_started.org#%s" (cond ((eq system-type 'darwin) "on-macos") ((memq system-type '(cygwin windows-nt ms-dos)) "on-windows") ("on-linux")))) (princ "Aborting...") 1) ((not (file-readable-p (expand-file-name "core/core.el" user-emacs-directory))) (princ (concat "Couldn't find or read '" (abbreviate-file-name (expand-file-name "core/core.el" user-emacs-directory)) "'.\n\n")) (princ "Are you sure Doom Emacs is correctly installed?\n\n") (if (file-symlink-p load-file-name) (progn (princ "This error can occur if you've symlinked the 'doom' script, which Doom does not\n") (princ "support. Consider symlinking its parent directory instead or explicitly set the\n") (princ "EMACSDIR environment variable, e.g.\n\n ") (princ (if (string-match-p "/fish$" (getenv "SHELL")) "env EMACSDIR=~/.emacs.d doom" "EMACSDIR=~/.emacs.d doom sync")) (princ "\n\n") (princ "Aborting..."))) 2) ((and (equal (user-real-uid) 0) (/= 0 (file-attribute-user-id (file-attributes user-emacs-directory)))) (princ "Do not run this script as root. It will cause file permissions errors later.\n\n") (princ "To carry on anyway, change the owner of your Emacs config to root:\n\n") (princ (concat " chown root:root -R " (abbreviate-file-name user-emacs-directory) "\n\n")) (princ "Aborting...") 3) ((load (expand-file-name "core/core.el" user-emacs-directory) nil t) (require 'core-cli) (apply #'doom-cli-execute :doom (cdr (member "--" argv))))))
(let* ((pcase-0 #'(lambda (command) (let ((script (expand-file-name "doom.sh" temporary-file-directory)) (coding-system-for-write 'utf-8-unix) (coding-system-for-read 'utf-8-unix)) (let ((temp-file script) (temp-buffer (generate-new-buffer " *temp file*" t))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert "#!/usr/bin/env sh\n" "_postscript() {\n" " rm -f " (shell-quote-argument script) "\n " (cond ((eq command :restart) "$@") ((stringp command) command) ((string-join (if (listp (car-safe command)) (cl-loop for line in (doom-enlist command) collect (mapconcat #'shell-quote-argument (remq nil line) " ")) (list (mapconcat #'shell-quote-argument (remq nil command) " "))) "\n "))) "\n}\n" (let ((save-match-data-internal (match-data))) (unwind-protect (progn (cl-loop for env in (cl-set-difference process-environment doom--initial-process-environment :test #'equal) if (string-match "^\\([a-zA-Z0-9_]+\\)=\\(.+\\)$" env) concat (format "%s=%s \\\n" (match-string 1 env) (shell-quote-argument (match-string 2 env))))) (set-match-data save-match-data-internal 'evaporate))) (format "PATH=\"%s%s$PATH\" \\\n" (concat doom-emacs-dir "bin/") path-separator) "_postscript $@\n")) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (set-file-modes script 384)) 128)) (val (catch 'exit (cond ((version< emacs-version "26.3") (princ (concat "Detected Emacs " emacs-version " (at " (car command-line-args) ").\n\n")) (princ "Doom only supports Emacs 26.3 and newer. 27.1 is highly recommended. A guide\n") (princ "to install a newer version of Emacs can be found at:\n\n ") (princ (format "https://doomemacs.org/docs/getting_started.org#%s" (cond ((eq system-type 'darwin) "on-macos") ((memq system-type '(cygwin windows-nt ms-dos)) "on-windows") ("on-linux")))) (princ "Aborting...") 1) ((not (file-readable-p (expand-file-name "core/core.el" user-emacs-directory))) (princ (concat "Couldn't find or read '" (abbreviate-file-name (expand-file-name "core/core.el" user-emacs-directory)) "'.\n\n")) (princ "Are you sure Doom Emacs is correctly installed?\n\n") (if (file-symlink-p load-file-name) (progn (princ "This error can occur if you've symlinked the 'doom' script, which Doom does not\n") (princ "support. Consider symlinking its parent directory instead or explicitly set the\n") (princ "EMACSDIR environment variable, e.g.\n\n ") (princ (if (string-match-p "/fish$" (getenv "SHELL")) "env EMACSDIR=~/.emacs.d doom" "EMACSDIR=~/.emacs.d doom sync")) (princ "\n\n") (princ "Aborting..."))) 2) ((and (equal (user-real-uid) 0) (/= 0 (file-attribute-user-id (file-attributes user-emacs-directory)))) (princ "Do not run this script as root. It will cause file permissions errors later.\n\n") (princ "To carry on anyway, change the owner of your Emacs config to root:\n\n") (princ (concat " chown root:root -R " (abbreviate-file-name user-emacs-directory) "\n\n")) (princ "Aborting...") 3) ((load (expand-file-name "core/core.el" user-emacs-directory) nil t) (require 'core-cli) (apply #'doom-cli-execute :doom (cdr (member "--" argv)))))))) (cond ((integerp val) (let ((code val)) code)) ((consp val) (funcall pcase-0 val)) ((stringp val) (funcall pcase-0 val)) ((keywordp val) (funcall pcase-0 val)) (t (let nil 0))))
(kill-emacs (let* ((pcase-0 #'(lambda (command) (let ((script (expand-file-name "doom.sh" temporary-file-directory)) (coding-system-for-write 'utf-8-unix) (coding-system-for-read 'utf-8-unix)) (let ((temp-file script) (temp-buffer (generate-new-buffer " *temp file*" t))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert "#!/usr/bin/env sh\n" "_postscript() {\n" " rm -f " (shell-quote-argument script) "\n " (cond ((eq command :restart) "$@") ((stringp command) command) ((string-join (if (listp (car-safe command)) (cl-loop for line in (doom-enlist command) collect (mapconcat #'shell-quote-argument (remq nil line) " ")) (list (mapconcat #'shell-quote-argument (remq nil command) " "))) "\n "))) "\n}\n" (let ((save-match-data-internal (match-data))) (unwind-protect (progn (cl-loop for env in (cl-set-difference process-environment doom--initial-process-environment :test #'equal) if (string-match "^\\([a-zA-Z0-9_]+\\)=\\(.+\\)$" env) concat (format "%s=%s \\\n" (match-string 1 env) (shell-quote-argument (match-string 2 env))))) (set-match-data save-match-data-internal 'evaporate))) (format "PATH=\"%s%s$PATH\" \\\n" (concat doom-emacs-dir "bin/") path-separator) "_postscript $@\n")) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (set-file-modes script 384)) 128)) (val (catch 'exit (cond ((version< emacs-version "26.3") (princ (concat "Detected Emacs " emacs-version " (at " (car command-line-args) ").\n\n")) (princ "Doom only supports Emacs 26.3 and newer. 27.1 is highly recommended. A guide\n") (princ "to install a newer version of Emacs can be found at:\n\n ") (princ (format "https://doomemacs.org/docs/getting_started.org#%s" (cond ((eq system-type 'darwin) "on-macos") ((memq system-type '(cygwin windows-nt ms-dos)) "on-windows") ("on-linux")))) (princ "Aborting...") 1) ((not (file-readable-p (expand-file-name "core/core.el" user-emacs-directory))) (princ (concat "Couldn't find or read '" (abbreviate-file-name (expand-file-name "core/core.el" user-emacs-directory)) "'.\n\n")) (princ "Are you sure Doom Emacs is correctly installed?\n\n") (if (file-symlink-p load-file-name) (progn (princ "This error can occur if you've symlinked the 'doom' script, which Doom does not\n") (princ "support. Consider symlinking its parent directory instead or explicitly set the\n") (princ "EMACSDIR environment variable, e.g.\n\n ") (princ (if (string-match-p "/fish$" (getenv "SHELL")) "env EMACSDIR=~/.emacs.d doom" "EMACSDIR=~/.emacs.d doom sync")) (princ "\n\n") (princ "Aborting..."))) 2) ((and (equal (user-real-uid) 0) (/= 0 (file-attribute-user-id (file-attributes user-emacs-directory)))) (princ "Do not run this script as root. It will cause file permissions errors later.\n\n") (princ "To carry on anyway, change the owner of your Emacs config to root:\n\n") (princ (concat " chown root:root -R " (abbreviate-file-name user-emacs-directory) "\n\n")) (princ "Aborting...") 3) ((load (expand-file-name "core/core.el" user-emacs-directory) nil t) (require 'core-cli) (apply #'doom-cli-execute :doom (cdr (member "--" argv)))))))) (cond ((integerp val) (let ((code val)) code)) ((consp val) (funcall pcase-0 val)) ((stringp val) (funcall pcase-0 val)) ((keywordp val) (funcall pcase-0 val)) (t (let nil 0)))))
(eval-buffer #<buffer *load*> nil "/Users/taazadi1/.emacs.d/bin/doom" nil t)
(load-with-code-conversion "/Users/taazadi1/.emacs.d/bin/doom" "/Users/taazadi1/.emacs.d/bin/doom" nil t)
(load "/Users/taazadi1/.emacs.d/bin/doom" nil t t)
(command-line-1 ("-scriptload" "/Users/taazadi1/.emacs.d/bin/doom" "--" "install"))
(command-line)
(normal-top-level)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment