I may have found a solution.... but I have no idea if it's a decent one....
;; Original non-functioning code. Trying to get the value of the package-archive-column-width into the list rather than hardcode it.
(setq tabulated-list-format
`[("Package" ,package-name-column-width package-menu--name-predicate)
("Version" ,package-version-column-width package-menu--version-predicate)
("Status" ,package-status-column-width package-menu--status-predicate)])
,@(if (cdr package-archives)
'(("Archive" ,package-archive-column-width package-menu--archive-predicate)))
("Description" 0 package-menu--description-predicate)])
;; potential solution.... any thoughts?
(setq tabulated-list-format
`[("Package" ,package-name-column-width package-menu--name-predicate)
("Version" ,package-version-column-width package-menu--version-predicate)
("Status" ,package-status-column-width package-menu--status-predicate)])
(if (cdr package-archives)
(setq tabulated-list-format (append tabulated-list-format `(("Archive" ,package-archive-column-width package-menu--archive-predicate)))))
(setq tabulated-list-format (append tabulated-list-format `(("Description" 0 package-menu--description-predicate))))
- Chris