mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-07 06:50:23 -08:00
* emacs-lisp/package.el (package--list-packages): Use switch-to-buffer.
This commit is contained in:
parent
1b71db167e
commit
2a8b13afb7
2 changed files with 14 additions and 9 deletions
|
|
@ -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 ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue