all repos — nixfiles @ 40133c84069510bc09ff2b460d0bf0f3da36097a

System and user configuration, managed by nix and home-manager

Emacs: Fix package archive functions' for 24.3
Alan Pearce alan@alanpearce.co.uk
Sat, 19 Jul 2014 13:13:08 +0100
commit

40133c84069510bc09ff2b460d0bf0f3da36097a

parent

75f064acac3c5b8d3ff84e15f70bd60e0422a975

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -60,7 +60,7 @@ (aref desc (1- (length desc))))) 
 (defun package-list-installed ()
   (loop for pkg in package-activated-list
-        collect (cdr (assq pkg package-archive-contents))))
+        collect (assq pkg package-archive-contents)))
 
 (defun package-archive-stats ()
   (let ((archives (makehash))
@@ -70,15 +70,15 @@ (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 pkg)))
+               (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 #'package-desc-name
-                          (--filter (equalp (package-desc-archive it) archive)
+  (let ((from-arc (mapcar #'car
+                          (--filter (equalp (package-desc-archive (cdr it)) archive)
                                     (package-list-installed)))))
     (if (called-interactively-p)
         (message "%s" from-arc)