]> code.delx.au - gnu-emacs/blobdiff - lisp/menu-bar.el
(avl-tree-del-balance1, avl-tree-del-balance2)
[gnu-emacs] / lisp / menu-bar.el
index 0aa047cd9ef440ca361cbe806e34a489b4a20246..148e59160974c4af619891a5fb69f983a5dc5bf9 100644 (file)
@@ -1,7 +1,7 @@
 ;;; menu-bar.el --- define a default menu bar
 
 ;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006 Free Software Foundation, Inc.
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: RMS
 ;; Maintainer: FSF
@@ -11,7 +11,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -462,9 +462,10 @@ A large number or nil slows down menu responsiveness."
              "Delete the text in region between mark and current position"))
 (defvar yank-menu (cons "Select Yank" nil))
 (fset 'yank-menu (cons 'keymap yank-menu))
-(define-key menu-bar-edit-menu [select-paste]
-  '(menu-item "Select and Paste" yank-menu
-             :enable (and (cdr yank-menu) (not buffer-read-only))))
+(define-key menu-bar-edit-menu [paste-from-menu]
+  '(menu-item "Paste from kill menu" yank-menu
+             :enable (and (cdr yank-menu) (not buffer-read-only))
+             :help "Choose a string from the kill ring and paste it"))
 (define-key menu-bar-edit-menu [paste]
   '(menu-item "Paste" yank
              :enable (and
@@ -623,8 +624,8 @@ by \"Save Options\" in Custom buffers.")
                 (let ((set (or (get ',variable 'custom-set) 'set-default))
                       (get (or (get ',variable 'custom-get) 'default-value)))
                   (funcall set ',variable (not (funcall get ',variable))))))
-          (message ,message "enabled")
-        (message ,message "disabled"))
+          (message ,message "enabled globally")
+        (message ,message "disabled globally"))
        ;; The function `customize-mark-as-set' must only be called when
        ;; a variable is set interactively, as the purpose is to mark it as
        ;; a candidate for "Save Options", and we do not want to save options
@@ -814,7 +815,7 @@ mail status in mode line"))
   (menu-bar-make-toggle toggle-indicate-empty-lines indicate-empty-lines
                        "Empty Line Indicators"
                        "Indicating of empty lines %s"
-                       "Indicate trailing empty lines in fringe"))
+                       "Indicate trailing empty lines in fringe, globally"))
 
 (defun menu-bar-showhide-fringe-menu-customize ()
   "Show customization buffer for `fringe-mode'."
@@ -923,13 +924,13 @@ mail status in mode line"))
 
 (define-key menu-bar-showhide-menu [showhide-tooltip-mode]
   (list 'menu-item "Tooltips" 'tooltip-mode
-       :help "Toggle tooltips on/off"
+       :help "Turn tooltips on/off"
        :visible  `(and (display-graphic-p) (fboundp 'x-show-tip))
        :button `(:toggle . tooltip-mode)))
 
 (define-key menu-bar-showhide-menu [menu-bar-mode]
   '(menu-item "Menu-bar" menu-bar-mode
-             :help "Toggle menu-bar on/off"
+             :help "Turn menu-bar on/off"
              :button (:toggle . menu-bar-mode)))
 
 (define-key menu-bar-showhide-menu [showhide-tool-bar]
@@ -1018,9 +1019,9 @@ mail status in mode line"))
 
 (define-key menu-bar-options-menu [case-fold-search]
   (menu-bar-make-toggle toggle-case-fold-search case-fold-search
-                       "Case-Insensitive Search"
-                       "Case-Insensitive Search %s"
-                       "Ignore letter-case in search"))
+           "Case-Insensitive Search"
+           "Case-Insensitive Search %s"
+           "Globally ignore letter-case in search"))
 
 (defun menu-bar-text-mode-auto-fill ()
   (interactive)
@@ -1126,7 +1127,8 @@ mail status in mode line"))
   '(menu-item "Programmable Calculator" calc
              :help "Invoke the Emacs built-in full scientific calculator"))
 (define-key menu-bar-tools-menu [calendar]
-  '(menu-item "Calendar" calendar))
+  '(menu-item "Calendar" calendar
+             :help "Invoke the Emacs built-in calendar"))
 
 (define-key menu-bar-tools-menu [separator-net]
   '("--"))
@@ -1158,11 +1160,9 @@ mail status in mode line"))
 (define-key menu-bar-tools-menu [separator-vc]
   '("--"))
 
-(defvar vc-menu-map (make-sparse-keymap "Version Control"))
 (define-key menu-bar-tools-menu [pcl-cvs]
   '(menu-item "PCL-CVS" cvs-global-menu))
-(define-key menu-bar-tools-menu [vc]
-  (list 'menu-item "Version Control" vc-menu-map))
+(define-key menu-bar-tools-menu [vc] nil) ;Create the place for the VC menu.
 
 (define-key menu-bar-tools-menu [separator-compare]
   '("--"))
@@ -1199,8 +1199,8 @@ mail status in mode line"))
   '(menu-item "Compile..." compile
              :help "Invoke compiler or Make, view compilation errors"))
 (define-key menu-bar-tools-menu [grep]
-  '(menu-item "Search Files (with grep)..." grep
-             :help "Search files for strings or regexps (with grep)"))
+  '(menu-item "Search Files (Grep)..." grep
+             :help "Search files for strings or regexps (with Grep)"))
 
 \f
 ;; The "Help" menu items
@@ -1349,6 +1349,9 @@ key, a click, or a menu-item"))
 (define-key menu-bar-help-menu [describe-copying]
   '(menu-item "Copying Conditions" describe-copying
              :help "Show the Emacs license (GPL)"))
+(define-key menu-bar-help-menu [describe-project]
+  '(menu-item "About GNU" describe-project
+             :help "About the GNU System, GNU Project, and GNU/Linux"))
 (define-key menu-bar-help-menu [describe-distribution]
   '(menu-item "Getting New Versions" describe-distribution
              :help "How to get latest versions of Emacs"))
@@ -1363,7 +1366,7 @@ key, a click, or a menu-item"))
                                 data-directory))
     (goto-address)))
 (define-key menu-bar-help-menu [about]
-  '(menu-item "About Emacs" display-splash-screen
+  '(menu-item "About Emacs" about-emacs
              :help "Display version number, copyright info, and basic help"))
 (define-key menu-bar-help-menu [sep2]
   '("--"))
@@ -1385,12 +1388,14 @@ key, a click, or a menu-item"))
   '(menu-item "Send Bug Report..." report-emacs-bug
              :help "Send e-mail to Emacs maintainers"))
 (define-key menu-bar-help-menu [emacs-problems]
-  '(menu-item "Emacs Known Problems" view-emacs-problems))
+  '(menu-item "Emacs Known Problems" view-emacs-problems
+             :help "Read about known problems with Emacs"))
 (define-key menu-bar-help-menu [emacs-news]
   '(menu-item "Emacs News" view-emacs-news
              :help "New features of this version"))
 (define-key menu-bar-help-menu [emacs-faq]
-  '(menu-item "Emacs FAQ" view-emacs-FAQ))
+  '(menu-item "Emacs FAQ" view-emacs-FAQ
+             :help "Frequently asked (and answered) questions about Emacs"))
 
 (defun help-with-tutorial-spec-language ()
   "Use the Emacs tutorial, specifying which language you want."
@@ -1596,14 +1601,14 @@ Buffers menu is regenerated."
                               name))))
                 ;; Compute the maximum length of any name.
                 (dolist (buf buffer-list)
-                  (unless (eq ?\  (aref (cdr buf) 0))
+                  (unless (eq ?\s (aref (cdr buf) 0))
                     (setq menu-bar-update-buffers-maxbuf
                           (max menu-bar-update-buffers-maxbuf
                                (length (cdr buf))))))
                 ;; Set ALIST to an alist of the form
                 ;; ITEM-STRING . BUFFER
                 (dolist (buf buffer-list)
-                  (unless (eq ?\  (aref (cdr buf) 0))
+                  (unless (eq ?\s (aref (cdr buf) 0))
                     (push (menu-bar-update-buffers-1 buf) alist)))
                 ;; Now make the actual list of items, and add
                 ;; some miscellaneous buffer commands to the end.