From ecb9eb5b91727b0222069bdf250ada64ea6e644d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 11 Jul 2015 16:02:33 +0200 Subject: Emacs: Remove package stats functions I don’t really care about these any more --- tag-emacs/emacs.d/init.el | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 5c881b7..f11336a 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 -- cgit 1.4.1