From: Ted Zlatanov Date: Mon, 4 Nov 2013 16:04:09 +0000 (-0500) Subject: Add Archive column to package list. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~989 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7397c58760779a3aa83ff58164455761d77cd642;p=emacs.git Add Archive column to package list. * emacs-lisp/package.el (package-menu-mode) (package-menu--print-info, package-menu--archive-predicate): Add Archive column to package list. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4530afbde21..4ef439a43c1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-11-04 Teodor Zlatanov + + * emacs-lisp/package.el (package-menu-mode) + (package-menu--print-info, package-menu--archive-predicate): Add + Archive column to package list. + 2013-11-04 Michael Albinus Fix problems found while writing a test suite. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 056bc9bd19b..e8768ea6ac9 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1581,6 +1581,7 @@ Letters do not insert themselves; instead, they are commands. (setq tabulated-list-format [("Package" 18 package-menu--name-predicate) ("Version" 12 nil) ("Status" 10 package-menu--status-predicate) + ("Archive" 10 package-menu--archive-predicate) ("Description" 0 nil)]) (setq tabulated-list-padding 2) (setq tabulated-list-sort-key (cons "Status" nil)) @@ -1703,6 +1704,8 @@ Return (PKG-DESC [NAME VERSION STATUS DOC])." (package-desc-version pkg-desc)) 'font-lock-face face) (propertize status 'font-lock-face face) + (propertize (or (package-desc-archive pkg-desc) "") + 'font-lock-face face) (propertize (package-desc-summary pkg-desc) 'font-lock-face face))))) @@ -1919,6 +1922,10 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." (string< (symbol-name (package-desc-name (car A))) (symbol-name (package-desc-name (car B))))) +(defun package-menu--archive-predicate (A B) + (string< (or (package-desc-archive (car A)) "") + (or (package-desc-archive (car B)) ""))) + ;;;###autoload (defun list-packages (&optional no-fetch) "Display a list of packages.