Commit 2a8b13af authored by Chong Yidong's avatar Chong Yidong
Browse files

* emacs-lisp/package.el (package--list-packages): Use switch-to-buffer.

parent 1b71db16
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> 2011-01-11 Johan Bockgård <bojohan@gnu.org>
   
* emacs-lisp/unsafep.el (unsafep): Handle backquoted forms. * emacs-lisp/unsafep.el (unsafep): Handle backquoted forms.
......
...@@ -1663,15 +1663,15 @@ A value of nil means to display all packages.") ...@@ -1663,15 +1663,15 @@ A value of nil means to display all packages.")
Optional PACKAGES is a list of names of packages (symbols) to Optional PACKAGES is a list of names of packages (symbols) to
list; the default is to display everything in `package-alist'." list; the default is to display everything in `package-alist'."
(require 'finder-inf nil t) (require 'finder-inf nil t)
(with-current-buffer (get-buffer-create "*Packages*") (let ((buf (get-buffer-create "*Packages*")))
(package-menu-mode) (with-current-buffer buf
(set (make-local-variable 'package-menu-package-list) packages) (package-menu-mode)
(set (make-local-variable 'package-menu-sort-key) nil) (set (make-local-variable 'package-menu-package-list) packages)
(package--generate-package-list) (set (make-local-variable 'package-menu-sort-key) nil)
;; It's okay to use pop-to-buffer here. The package menu buffer (package--generate-package-list))
;; has keybindings, and the user just typed `M-x list-packages', ;; The package menu buffer has keybindings. If the user types
;; suggesting that they might want to use them. ;; `M-x list-packages', that suggests it should become current.
(pop-to-buffer (current-buffer)))) (switch-to-buffer buf)))
;;;###autoload ;;;###autoload
(defun list-packages () (defun list-packages ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment