Variable: package-menu-mode-hook
package-menu-mode-hook is a variable defined in package.el.gz.
Value
nil
Documentation
Hook run after entering Package Menu mode.
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(define-derived-mode package-menu-mode tabulated-list-mode "Package Menu"
"Major mode for browsing a list of packages.
The most useful commands here are:
`x': Install the package under point if it isn't already installed,
and delete it if it's already installed,
`i': mark a package for installation, and
`d': mark a package for deletion. Use the `x' command to perform the
actions on the marked files.
\\<package-menu-mode-map>
\\{package-menu-mode-map}"
:interactive nil
(setq mode-line-process '((package--downloads-in-progress ":Loading")
(package-menu--transaction-status
package-menu--transaction-status)))
(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)])
(setq tabulated-list-padding 2)
(setq tabulated-list-sort-key (cons "Status" nil))
(add-hook 'tabulated-list-revert-hook #'package-menu--refresh nil t)
(tabulated-list-init-header)
(setq revert-buffer-function 'package-menu--refresh-contents)
(setf imenu-prev-index-position-function
#'package--imenu-prev-index-position-function)
(setf imenu-extract-index-name-function
#'package--imenu-extract-index-name-function))