Commit e687c2cd authored by Chong Yidong's avatar Chong Yidong

Set revert-buffer-function in Package Menu.

* emacs-lisp/package.el (package-menu-mode-map): Change
package-menu-revert bindings to revert-buffer.
(package-menu-mode): Set revert-buffer-function.
(package-menu-revert): Doc fix.
parent 2e23878e
2010-09-02 Chong Yidong <cyd@stupidchicken.com>
* emacs-lisp/package.el (package-menu-mode-map): Change
package-menu-revert bindings to revert-buffer.
(package-menu-mode): Set revert-buffer-function.
(package-menu-revert): Doc fix.
2010-09-02 Agustín Martín <agustin.martin@hispalinux.es>
* textmodes/ispell.el (ispell-init-process): Use "~/" as
......
......@@ -1195,7 +1195,7 @@ The variable `package-load-list' controls which packages to load."
(define-key map "\177" 'package-menu-backup-unmark)
(define-key map "d" 'package-menu-mark-delete)
(define-key map "i" 'package-menu-mark-install)
(define-key map "g" 'package-menu-revert)
(define-key map "g" 'revert-buffer)
(define-key map "r" 'package-menu-refresh)
(define-key map "~" 'package-menu-mark-obsolete-for-deletion)
(define-key map "x" 'package-menu-execute)
......@@ -1229,7 +1229,7 @@ The variable `package-load-list' controls which packages to load."
:help "Mark a package for installation and move to the next line"))
(define-key menu-map [s3] '("--"))
(define-key menu-map [mg]
'(menu-item "Update package list" package-menu-revert
'(menu-item "Update package list" revert-buffer
:help "Update the list of packages"))
(define-key menu-map [mr]
'(menu-item "Refresh package list" package-menu-refresh
......@@ -1272,6 +1272,7 @@ Letters do not insert themselves; instead, they are commands.
(setq mode-name "Package Menu")
(setq truncate-lines t)
(setq buffer-read-only t)
(setq revert-buffer-function 'package-menu-revert)
(setq header-line-format
(mapconcat
(lambda (pair)
......@@ -1311,8 +1312,10 @@ available for download."
(package-refresh-contents)
(package--generate-package-list))
(defun package-menu-revert ()
"Update the list of packages."
(defun package-menu-revert (&optional arg noconfirm)
"Update the list of packages.
This function is the `revert-buffer-function' for Package Menu
buffers. The arguments are ignored."
(interactive)
(unless (eq major-mode 'package-menu-mode)
(error "The current buffer is not a Package Menu"))
......
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