diff options
Diffstat (limited to 'tag-emacs/emacs.d/init.el')
-rw-r--r-- | tag-emacs/emacs.d/init.el | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 5c881b7e..f11336aa 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -51,40 +51,6 @@ :defer 5 :config (pallet-mode 1)) -(if (not (fboundp #'package-desc-archive)) - (defsubst package-desc-archive (desc) - (aref desc (1- (length desc))))) - -(defun package-list-installed () - (loop for pkg in package-activated-list - collect (assq pkg package-archive-contents))) - -(defun package-archive-stats () - (let ((archives (make-hash-table)) - (assoc '())) - (dolist (arc package-archives) - (puthash (car arc) 0 archives)) - (maphash (lambda (k v) - (setq assoc (cons (cons k v) assoc))) - (dolist (pkg (-filter #'identity (package-list-installed)) archives) - (let ((pkg-arc (package-desc-archive (cdr pkg)))) - (incf (gethash pkg-arc archives))))) - assoc)) - -(defun package-show-installed-from-archive (archive) - (interactive (list (helm-comp-read "Archive: " (mapcar #'car package-archives) - :must-match t))) - (let ((from-arc (mapcar #'car - (--filter (equalp (package-desc-archive (cdr it)) archive) - (package-list-installed))))) - (if (called-interactively-p 'any) - (message "%s" from-arc) - from-arc))) - -(defun package-show-archive-stats () - (interactive) - (message "%s" (package-archive-stats))) - ;;;; Style (req-package whitespace |