]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/package.el (list-packages): Call refresh in right buffer
authorArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 12 Apr 2015 12:44:43 +0000 (13:44 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 12 Apr 2015 12:45:30 +0000 (13:45 +0100)
lisp/emacs-lisp/package.el

index ad482e564b02fc861af84db710d22634c49e64a3..dac70af961614edfe4bf84e8bd60ddec031c829a 100644 (file)
@@ -2943,13 +2943,14 @@ The list is displayed in a buffer named `*Packages*'."
   (add-hook 'package--post-download-archives-hook
             #'package-menu--post-refresh)
 
-  ;; Fetch the remote list of packages.
-  (unless no-fetch (package-menu-refresh))
-
   ;; Generate the Package Menu.
   (let ((buf (get-buffer-create "*Packages*")))
     (with-current-buffer buf
       (package-menu-mode)
+
+      ;; Fetch the remote list of packages.
+      (unless no-fetch (package-menu-refresh))
+
       (package-menu--generate nil t))
     ;; The package menu buffer has keybindings.  If the user types
     ;; `M-x list-packages', that suggests it should become current.