Function: package-menu--post-refresh

package-menu--post-refresh is a byte-compiled function defined in package.el.gz.

Signature

(package-menu--post-refresh)

Documentation

Revert "*Packages*" buffer and check for new packages and upgrades.

Do nothing if there's no *Packages* buffer.

This function is called after package-refresh-contents and it is added to post-command-hook by any function which alters the package database (package-install and package-delete). When run, it removes itself from post-command-hook.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(defun package-menu--post-refresh ()
  "Revert \"*Packages*\" buffer and check for new packages and upgrades.
Do nothing if there's no *Packages* buffer.

This function is called after `package-refresh-contents' and it
is added to `post-command-hook' by any function which alters the
package database (`package-install' and `package-delete').  When
run, it removes itself from `post-command-hook'."
  (remove-hook 'post-command-hook #'package-menu--post-refresh)
  (let ((buf (get-buffer "*Packages*")))
    (when (buffer-live-p buf)
      (with-current-buffer buf
        (package-menu--populate-new-package-list)
        (run-hooks 'tabulated-list-revert-hook)
        (tabulated-list-print 'remember 'update)))))