changeset 92703:0905c6be13b6

(makefile-mode-abbrev-table): Add menu entries and add :help to the existing ones.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 10 Mar 2008 05:02:55 +0000
parents 61bc109c3133
children 22bce4d93530
files lisp/ChangeLog lisp/progmodes/make-mode.el
diffstat 2 files changed, 61 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Mar 10 02:49:49 2008 +0000
+++ b/lisp/ChangeLog	Mon Mar 10 05:02:55 2008 +0000
@@ -1,3 +1,8 @@
+2008-03-10  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* progmodes/make-mode.el (makefile-mode-abbrev-table): Add menu
+	entries and add :help to the existing ones.
+
 2008-03-10  Glenn Morris  <rgm@gnu.org>
 
 	* calendar/cal-hebrew.el (date, entry, number): Move declarations
--- a/lisp/progmodes/make-mode.el	Mon Mar 10 02:49:49 2008 +0000
+++ b/lisp/progmodes/make-mode.el	Mon Mar 10 05:02:55 2008 +0000
@@ -582,7 +582,8 @@
   (define-abbrev-table 'makefile-mode-abbrev-table ()))
 
 (defvar makefile-mode-map
-  (let ((map (make-sparse-keymap)))
+  (let ((map (make-sparse-keymap))
+	(opt-map (make-sparse-keymap)))
     ;; set up the keymap
     (define-key map "\C-c:" 'makefile-insert-target-ref)
     (if makefile-electric-keys
@@ -612,17 +613,64 @@
     (define-key map [menu-bar makefile-mode]
       (cons "Makefile" (make-sparse-keymap "Makefile")))
 
+    (define-key map [menu-bar makefile-mode makefile-type]
+      (cons "Switch Makefile Type" opt-map))
+    (define-key opt-map [makefile-makepp-mode]
+      '(menu-item "Makepp" makefile-makepp-mode
+		  :help "An adapted `makefile-mode' that knows about makepp"
+		  :button (:radio . (eq major-mode 'makefile-makepp-mode))))
+    (define-key opt-map [makefile-imake-mode]
+      '(menu-item "Imake" makefile-imake-mode
+		  :help "An adapted `makefile-mode' that knows about imake"
+		  :button (:radio . (eq major-mode 'makefile-imake-mode))))
+    (define-key opt-map [makefile-mode]
+      '(menu-item "Classic" makefile-mode
+		  :help "`makefile-mode' with no special functionality"
+		  :button (:radio . (eq major-mode 'makefile-mode))))
+    (define-key opt-map [makefile-bsdmake-mode]
+      '(menu-item "BSD" makefile-bsdmake-mode
+		  :help "An adapted `makefile-mode' that knows about BSD make"
+		  :button (:radio . (eq major-mode 'makefile-bsdmake-mode))))
+    (define-key opt-map [makefile-automake-mode]
+      '(menu-item "Automake" makefile-automake-mode
+		  :help "An adapted `makefile-mode' that knows about automake"
+		  :button (:radio . (eq major-mode 'makefile-automake-mode))))
+    (define-key opt-map [makefile-gmake-mode]
+      '(menu-item "GNU make" makefile-gmake-mode
+		  :help "An adapted `makefile-mode' that knows about GNU make"
+		  :button (:radio . (eq major-mode 'makefile-gmake-mode))))
     (define-key map [menu-bar makefile-mode browse]
-      '("Pop up Makefile Browser" . makefile-switch-to-browser))
-    (define-key map [menu-bar makefile-mode complete]
-      '("Complete Target or Macro" . makefile-complete))
+      '(menu-item "Pop up Makefile Browser" makefile-switch-to-browser
+		  ;; XXX: this needs a better string, the function is not documented...
+		  :help "Pop up Makefile Browser"))
+    (define-key map [menu-bar makefile-mode overview]
+      '(menu-item "Up To Date Overview" makefile-create-up-to-date-overview
+		  :help "Create a buffer containing an overview of the state of all known targets"))
+    ;; Target related
+    (define-key map [menu-bar makefile-mode separator1]  '("----"))
+    (define-key map [menu-bar makefile-mode pickup-file]
+      '(menu-item "Pick File Name as Target" makefile-pickup-filenames-as-targets
+		  :help "Scan the current directory for filenames to use as targets"))
+    (define-key map [menu-bar makefile-mode function]
+      '(menu-item "Insert GNU make function" makefile-insert-gmake-function
+		  :help "Insert a GNU make function call"))
     (define-key map [menu-bar makefile-mode pickup]
-      '("Find Targets and Macros" . makefile-pickup-everything))
-
+      '(menu-item "Find Targets and Macros" makefile-pickup-everything
+		  :help "Notice names of all macros and targets in Makefile"))
+    (define-key map [menu-bar makefile-mode complete]
+      '(menu-item "Complete Target or Macro" makefile-complete
+		  :help "Perform completion on Makefile construct preceding point"))
+    (define-key map [menu-bar makefile-mode backslash]
+      '(menu-item "Backslash Region" makefile-backslash-region
+		  :help "Insert, align, or delete end-of-line backslashes on the lines in the region"))
+    ;; Motion
+    (define-key map [menu-bar makefile-mode separator]  '("----"))
     (define-key map [menu-bar makefile-mode prev]
-      '("Move to Previous Dependency" . makefile-previous-dependency))
+      '(menu-item "Move to Previous Dependency" makefile-previous-dependency
+		  :help "Move point to the beginning of the previous dependency line"))
     (define-key map [menu-bar makefile-mode next]
-      '("Move to Next Dependency" . makefile-next-dependency))
+      '(menu-item "Move to Next Dependency" makefile-next-dependency
+		  :help "Move point to the beginning of the next dependency line"))
     map)
   "The keymap that is used in Makefile mode.")