changeset 109020:9087d6113b47

* lisp/emacs-lisp/package.el (package-menu-mode-map): Add a menu.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 17 Jun 2010 09:41:13 -0700
parents cc5e488bdbb4
children 35894ae393bb
files lisp/ChangeLog lisp/emacs-lisp/package.el
diffstat 2 files changed, 51 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jun 17 16:44:34 2010 +0200
+++ b/lisp/ChangeLog	Thu Jun 17 09:41:13 2010 -0700
@@ -1,3 +1,7 @@
+2010-06-17  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* emacs-lisp/package.el (package-menu-mode-map): Add a menu.
+
 2010-06-17  Agustín Martín  <agustin.martin@hispalinux.es>
 
 	* ispell.el (ispell-aspell-find-dictionary): Fix regexp for
--- a/lisp/emacs-lisp/package.el	Thu Jun 17 16:44:34 2010 +0200
+++ b/lisp/emacs-lisp/package.el	Thu Jun 17 09:41:13 2010 -0700
@@ -1041,7 +1041,8 @@
 ;;;; Package menu mode.
 
 (defvar package-menu-mode-map
-  (let ((map (make-keymap)))
+  (let ((map (make-keymap))
+	(menu-map (make-sparse-keymap "Package")))
     (suppress-keymap map)
     (define-key map "q" 'quit-window)
     (define-key map "n" 'next-line)
@@ -1056,6 +1057,51 @@
     (define-key map "x" 'package-menu-execute)
     (define-key map "h" 'package-menu-quick-help)
     (define-key map "?" 'package-menu-view-commentary)
+    (define-key map [menu-bar package-menu] (cons "Package" menu-map))
+    (define-key menu-map [mq]
+      '(menu-item "Quit" quit-window
+		  :help "Quit package selection"))
+    (define-key menu-map [s1] '("--"))
+    (define-key menu-map [mn]
+      '(menu-item "Next" next-line
+		  :help "Next Line"))
+    (define-key menu-map [mp]
+      '(menu-item "Previous" previous-line
+		  :help "Previous Line"))
+    (define-key menu-map [s2] '("--"))
+    (define-key menu-map [mu]
+      '(menu-item "Unmark" package-menu-mark-unmark
+		  :help "Clear any marks on a package and move to the next line"))
+    (define-key menu-map [munm]
+      '(menu-item "Unmark backwards" package-menu-backup-unmark
+		  :help "Back up one line and clear any marks on that package"))
+    (define-key menu-map [md]
+      '(menu-item "Mark for deletion" package-menu-mark-delete
+		  :help "Mark a package for deletion and move to the next line"))
+    (define-key menu-map [mi]
+      '(menu-item "Mark for install" package-menu-mark-install
+		  :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
+		  :help "Update the list of packages"))
+    (define-key menu-map [mr]
+      '(menu-item "Refresh package list" package-menu-refresh
+		  :help "Download the ELPA archive"))
+    (define-key menu-map [s4] '("--"))
+    (define-key menu-map [mt]
+      '(menu-item "Mark obsolete packages" package-menu-mark-obsolete-for-deletion
+		  :help "Mark all obsolete packages for deletion"))
+    (define-key menu-map [mx]
+      '(menu-item "Execute actions" package-menu-execute
+		  :help "Perform all the marked actions"))
+    (define-key menu-map [s5] '("--"))
+    (define-key menu-map [mh]
+      '(menu-item "Help" package-menu-quick-help
+		  :help "Show short key binding help for package-menu-mode"))
+    (define-key menu-map [mc]
+      '(menu-item "View Commentary" package-menu-view-commentary
+		  :help "Display information about this package"))
     map)
   "Local keymap for `package-menu-mode' buffers.")