emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102826: * emacs-lisp/package.el (pac


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102826: * emacs-lisp/package.el (package--list-packages): Use switch-to-buffer.
Date: Wed, 12 Jan 2011 13:57:23 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102826
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Wed 2011-01-12 13:57:23 -0500
message:
  * emacs-lisp/package.el (package--list-packages): Use switch-to-buffer.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/package.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-01-11 18:42:30 +0000
+++ b/lisp/ChangeLog    2011-01-12 18:57:23 +0000
@@ -1,3 +1,8 @@
+2011-01-12  Chong Yidong  <address@hidden>
+
+       * emacs-lisp/package.el (package--list-packages): Use
+       switch-to-buffer.
+
 2011-01-11  Johan Bockgård  <address@hidden>
 
        * emacs-lisp/unsafep.el (unsafep): Handle backquoted forms.

=== modified file 'lisp/emacs-lisp/package.el'
--- a/lisp/emacs-lisp/package.el        2010-11-10 21:35:06 +0000
+++ b/lisp/emacs-lisp/package.el        2011-01-12 18:57:23 +0000
@@ -1663,15 +1663,15 @@
 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 ()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]