]> git.eshelyaron.com Git - emacs.git/commitdiff
* emacs-lisp/package.el (package--list-packages): Use switch-to-buffer.
authorChong Yidong <cyd@stupidchicken.com>
Wed, 12 Jan 2011 18:57:23 +0000 (13:57 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 12 Jan 2011 18:57:23 +0000 (13:57 -0500)
lisp/ChangeLog
lisp/emacs-lisp/package.el

index 0c3f09e157bff197453c6d8be3ba9752888fad55..e492282d239435c0eb27e9bfa8a63e1a1c449cd9 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-12  Chong Yidong  <cyd@stupidchicken.com>
+
+       * emacs-lisp/package.el (package--list-packages): Use
+       switch-to-buffer.
+
 2011-01-11  Johan Bockgård  <bojohan@gnu.org>
 
        * emacs-lisp/unsafep.el (unsafep): Handle backquoted forms.
index fecddcf16edf1153015e642d93b109cea11f09a9..dfe1a4309cae6fd04a20e0c44e57fa3860873687 100644 (file)
@@ -1663,15 +1663,15 @@ A value of nil means to display all packages.")
 Optional PACKAGES is a list of names of packages (symbols) to
 list; the default is to display everything in `package-alist'."
   (require 'finder-inf nil t)
-  (with-current-buffer (get-buffer-create "*Packages*")
-    (package-menu-mode)
-    (set (make-local-variable 'package-menu-package-list) packages)
-    (set (make-local-variable 'package-menu-sort-key) nil)
-    (package--generate-package-list)
-    ;; It's okay to use pop-to-buffer here.  The package menu buffer
-    ;; has keybindings, and the user just typed `M-x list-packages',
-    ;; suggesting that they might want to use them.
-    (pop-to-buffer (current-buffer))))
+  (let ((buf (get-buffer-create "*Packages*")))
+    (with-current-buffer buf
+      (package-menu-mode)
+      (set (make-local-variable 'package-menu-package-list) packages)
+      (set (make-local-variable 'package-menu-sort-key) nil)
+      (package--generate-package-list))
+    ;; The package menu buffer has keybindings.  If the user types
+    ;; `M-x list-packages', that suggests it should become current.
+    (switch-to-buffer buf)))
 
 ;;;###autoload
 (defun list-packages ()