diff lisp/menu-bar.el @ 90224:2d92f5c9d6ae

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-78 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 514-518) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 104-105) - Update from CVS
author Miles Bader <miles@gnu.org>
date Fri, 26 Aug 2005 09:51:52 +0000
parents f9a65d7ebd29 7adadc9e4a10
children a3716f7538f2
line wrap: on
line diff
--- a/lisp/menu-bar.el	Fri Aug 05 10:57:36 2005 +0000
+++ b/lisp/menu-bar.el	Fri Aug 26 09:51:52 2005 +0000
@@ -1,7 +1,7 @@
 ;;; menu-bar.el --- define a default menu bar
 
-;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2005
-;;           Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004,
+;;   2005 Free Software Foundation, Inc.
 
 ;; Author: RMS
 ;; Maintainer: FSF
@@ -99,13 +99,13 @@
 	      :help "Open a new frame"))
 
 (define-key menu-bar-file-menu [one-window]
-  '(menu-item "Unsplit Windows" delete-other-windows
+  '(menu-item "Remove Splits" delete-other-windows
 	      :enable (not (one-window-p t nil))
-	      :help "Make selected window fill its frame"))
+	      :help "Selected window grows to fill the whole frame"))
 
 (define-key menu-bar-file-menu [split-window]
   '(menu-item "Split Window" split-window-vertically
-	      :help "Split selected window in two"))
+	      :help "Split selected window in two windows"))
 
 (define-key menu-bar-file-menu [separator-window]
   '(menu-item "--"))
@@ -159,12 +159,12 @@
 					 (current-buffer))))))
 	      :help "Re-read current buffer from its file"))
 (define-key menu-bar-file-menu [write-file]
-  '(menu-item "Save Buffer As..." write-file
+  '(menu-item "Save As..." write-file
 	      :enable (not (window-minibuffer-p
 			    (frame-selected-window menu-updating-frame)))
 	      :help "Write current buffer to another file"))
 (define-key menu-bar-file-menu [save-buffer]
-  '(menu-item "Save (current buffer)" save-buffer
+  '(menu-item "Save" save-buffer
 	      :enable (and (buffer-modified-p)
 			   (buffer-file-name)
 			   (not (window-minibuffer-p
@@ -175,9 +175,9 @@
   '(menu-item "--"))
 
 (define-key menu-bar-file-menu [kill-buffer]
-  '(menu-item "Close (current buffer)" kill-this-buffer
+  '(menu-item "Close" kill-this-buffer
 	      :enable (kill-this-buffer-enabled-p)
-	      :help "Discard current buffer"))
+	      :help "Discard (kill) current buffer"))
 (define-key menu-bar-file-menu [insert-file]
   '(menu-item "Insert File..." insert-file
 	      :enable (not (window-minibuffer-p
@@ -194,7 +194,7 @@
 			    (frame-selected-window menu-updating-frame)))
 	      :help "Read an existing file into an Emacs buffer"))
 (define-key menu-bar-file-menu [new-file]
-  '(menu-item "New File..." find-file
+  '(menu-item "Visit New File..." find-file
 	      :enable (not (window-minibuffer-p
 			    (frame-selected-window menu-updating-frame)))
 	      :help "Read or create a file and edit it"))
@@ -641,7 +641,8 @@
     ;; put on a customized-value property.
     (dolist (elt '(line-number-mode column-number-mode size-indication-mode
 		   cua-mode show-paren-mode transient-mark-mode
-		   global-font-lock-mode blink-cursor-mode))
+		   global-font-lock-mode blink-cursor-mode
+		   display-time-mode display-battery-mode))
       (and (customize-mark-to-save elt)
 	   (setq need-save t)))
     ;; These are set with `customize-set-variable'.
@@ -649,8 +650,8 @@
 		   debug-on-quit debug-on-error
 		   tooltip-mode menu-bar-mode tool-bar-mode
 		   save-place uniquify-buffer-name-style fringe-mode
-		   fringe-indicators case-fold-search
-		   display-time-mode auto-compression-mode
+		   indicate-empty-lines indicate-buffer-boundaries
+		   case-fold-search
 		   current-language-environment default-input-method
 		   ;; Saving `text-mode-hook' is somewhat questionable,
 		   ;; as we might get more than we bargain for, if
@@ -700,10 +701,16 @@
 (define-key menu-bar-showhide-menu [linecolumn-separator]
   '("--"))
 
+(define-key menu-bar-showhide-menu [showhide-battery]
+  (menu-bar-make-mm-toggle display-battery-mode
+			   "Battery Status"
+			   "Display battery status information in mode line"))
+
 (define-key menu-bar-showhide-menu [showhide-date-time]
   (menu-bar-make-mm-toggle display-time-mode
-			   "Date, Time and Mail"
-			   "Display date, time, mail status in mode line"))
+			   "Time, Load and Mail"
+			   "Display time, system load averages and \
+mail status in mode line"))
 
 (define-key menu-bar-showhide-menu [datetime-separator]
   '("--"))
@@ -717,88 +724,92 @@
 			      (frame-visible-p
 			       (symbol-value 'speedbar-frame))))))
 
-
-(defvar menu-bar-showhide-fringe-ind-menu (make-sparse-keymap "Indicators"))
+(defvar menu-bar-showhide-fringe-menu (make-sparse-keymap "Fringe"))
 
-;; The real definition is in fringe.el.
-;; This is to prevent errors in the :radio conditions below.
-(setq fringe-indicators nil)
+(defvar menu-bar-showhide-fringe-ind-menu
+  (make-sparse-keymap "Buffer boundaries"))
 
-(defun menu-bar-showhide-fringe-ind-empty ()
-  "Display empty line indicators in the left or right fringe."
+(defun menu-bar-showhide-fringe-ind-customize ()
+  "Show customization buffer for `indicate-buffer-boundaries'."
   (interactive)
-  (require 'fringe)
-  (customize-set-variable 'fringe-indicators 'empty))
+  (customize-variable 'indicate-buffer-boundaries))
 
-(define-key menu-bar-showhide-fringe-ind-menu [empty]
-  '(menu-item "Empty lines only" menu-bar-showhide-fringe-ind-empty
-	      :help "Show empty line indicators in fringe"
-	      :visible (display-graphic-p)
-	      :button (:radio . (eq fringe-indicators 'empty))))
+(define-key menu-bar-showhide-fringe-ind-menu [customize]
+  '(menu-item "Other (Customize)"
+	      menu-bar-showhide-fringe-ind-customize
+	      :help "Additional choices available through Custom buffer"
+	      :visible (display-graphic-p)))
 
 (defun menu-bar-showhide-fringe-ind-mixed ()
-  "Display top and bottom indicators in opposite fringes, arrow in right."
+  "Display top and bottom indicators in opposite fringes, arrows in right."
   (interactive)
-  (require 'fringe)
-  (customize-set-variable 'fringe-indicators 'mixed))
+  (customize-set-variable 'indicate-buffer-boundaries
+			  '((t . right) (top . left))))
 
 (define-key menu-bar-showhide-fringe-ind-menu [mixed]
-  '(menu-item "Opposite, arrows right" menu-bar-showhide-fringe-ind-mixed
-	      :help "Show top/bottom indicators in opposite fringes, arrows in right"
+  '(menu-item "Opposite, Arrows Right" menu-bar-showhide-fringe-ind-mixed
+	      :help
+	      "Show top/bottom indicators in opposite fringes, arrows in right"
 	      :visible (display-graphic-p)
-	      :button (:radio . (eq fringe-indicators 'mixed))))
+	      :button (:radio . (eq indicate-buffer-boundaries
+				    '((t . right) (top . left))))))
 
 (defun menu-bar-showhide-fringe-ind-box ()
   "Display top and bottom indicators in opposite fringes."
   (interactive)
-  (require 'fringe)
-  (customize-set-variable 'fringe-indicators 'box))
+  (customize-set-variable 'indicate-buffer-boundaries
+			  '((top . left) (bottom . right))))
 
 (define-key menu-bar-showhide-fringe-ind-menu [box]
-  '(menu-item "Opposite, no arrows" menu-bar-showhide-fringe-ind-box
+  '(menu-item "Opposite, No Arrows" menu-bar-showhide-fringe-ind-box
 	      :help "Show top/bottom indicators in opposite fringes, no arrows"
 	      :visible (display-graphic-p)
-	      :button (:radio . (eq fringe-indicators 'box))))
+	      :button (:radio . (eq indicate-buffer-boundaries
+				    '((top . left) (bottom . right))))))
 
 (defun menu-bar-showhide-fringe-ind-right ()
-  "Display fringe indicators in the right fringe."
+  "Display buffer boundaries and arrows in the right fringe."
   (interactive)
-  (require 'fringe)
-  (customize-set-variable 'fringe-indicators 'right))
+  (customize-set-variable 'indicate-buffer-boundaries 'right))
 
 (define-key menu-bar-showhide-fringe-ind-menu [right]
-  '(menu-item "In right fringe" menu-bar-showhide-fringe-ind-right
-	      :help "Show indicators in right fringe"
+  '(menu-item "In Right Fringe" menu-bar-showhide-fringe-ind-right
+	      :help "Show buffer boundaries and arrows in right fringe"
 	      :visible (display-graphic-p)
-	      :button (:radio . (eq fringe-indicators 'right))))
+	      :button (:radio . (eq indicate-buffer-boundaries 'right))))
 
 (defun menu-bar-showhide-fringe-ind-left ()
-  "Display fringe indicators in the left fringe."
+  "Display buffer boundaries and arrows in the left fringe."
   (interactive)
-  (require 'fringe)
-  (customize-set-variable 'fringe-indicators 'left))
+  (customize-set-variable 'indicate-buffer-boundaries 'left))
 
 (define-key menu-bar-showhide-fringe-ind-menu [left]
-  '(menu-item "In left fringe" menu-bar-showhide-fringe-ind-left
-	      :help "Show indicators in left fringe"
+  '(menu-item "In Left Fringe" menu-bar-showhide-fringe-ind-left
+	      :help "Show buffer boundaries and arrows in left fringe"
 	      :visible (display-graphic-p)
-	      :button (:radio . (eq fringe-indicators 'left))))
+	      :button (:radio . (eq indicate-buffer-boundaries 'left))))
 
 (defun menu-bar-showhide-fringe-ind-none ()
-  "Do not display any fringe indicators."
+  "Do not display any buffer boundary indicators."
   (interactive)
-  (require 'fringe)
-  (customize-set-variable 'fringe-indicators nil))
+  (customize-set-variable 'indicate-buffer-boundaries nil))
 
 (define-key menu-bar-showhide-fringe-ind-menu [none]
-  '(menu-item "No indicators" menu-bar-showhide-fringe-ind-none
-	      :help "Hide all fringe indicators"
+  '(menu-item "No Indicators" menu-bar-showhide-fringe-ind-none
+	      :help "Hide all buffer boundary indicators and arrows"
 	      :visible (display-graphic-p)
-	      :button (:radio . (eq fringe-indicators nil))))
-
+	      :button (:radio . (eq indicate-buffer-boundaries nil))))
 
+(define-key menu-bar-showhide-fringe-menu [showhide-fringe-ind]
+  (list 'menu-item "Buffer Boundaries" menu-bar-showhide-fringe-ind-menu
+	:visible `(display-graphic-p)
+	:help "Indicate buffer boundaries in fringe"))
 
-(defvar menu-bar-showhide-fringe-menu (make-sparse-keymap "Fringe"))
+(define-key menu-bar-showhide-fringe-menu [indicate-empty-lines]
+  (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"))
 
 (defun menu-bar-showhide-fringe-menu-customize ()
   "Show customization buffer for `fringe-mode'."
@@ -806,7 +817,7 @@
   (customize-variable 'fringe-mode))
 
 (define-key menu-bar-showhide-fringe-menu [customize]
-  '(menu-item "Customize" menu-bar-showhide-fringe-menu-customize
+  '(menu-item "Customize Fringe" menu-bar-showhide-fringe-menu-customize
 	      :help "Detailed customization of fringe"
 	      :visible (display-graphic-p)))
 
@@ -815,15 +826,6 @@
   (interactive)
   (customize-set-variable 'fringe-mode nil))
 
-(define-key menu-bar-showhide-fringe-menu [showhide-fringe-ind]
-  (list 'menu-item "Indicators" menu-bar-showhide-fringe-ind-menu
-	:visible `(display-graphic-p)
-	:help "Select fringe mode"))
-
-;; The real definition is in fringe.el.
-;; This is to prevent errors in the :radio conditions below.
-(setq fringe-mode nil)
-
 (define-key menu-bar-showhide-fringe-menu [default]
   '(menu-item "Default" menu-bar-showhide-fringe-menu-customize-reset
 	      :help "Default width fringe on both left and right side"
@@ -975,13 +977,6 @@
 (define-key menu-bar-options-menu [cursor-separator]
   '("--"))
 
-(define-key menu-bar-options-menu [toggle-auto-compression]
-  '(menu-item "Automatic File De/compression"
-	      auto-compression-mode
-	      :help "Transparently decompress compressed files"
-	      :button (:toggle . (rassq 'jka-compr-handler
-					file-name-handler-alist))))
-
 (define-key menu-bar-options-menu [save-place]
   (menu-bar-make-toggle toggle-save-place-globally save-place
 			"Save Place in Files between Sessions"
@@ -1007,7 +1002,7 @@
   '("--"))
 (define-key menu-bar-options-menu [cua-mode]
   (menu-bar-make-mm-toggle cua-mode
-			   "C-x/C-c/C-v cut and paste (CUA)"
+			   "C-x/C-c/C-v Cut and Paste (CUA)"
 			   "Use C-z/C-x/C-c/C-v keys for undo/cut/copy/paste"))
 
 (define-key menu-bar-options-menu [case-fold-search]
@@ -1253,15 +1248,10 @@
   '(menu-item "Describe Function..." describe-function
 	      :help "Display documentation of function/command"))
 (define-key menu-bar-describe-menu [describe-key-1]
-  '(menu-item "Describe Key..." describe-key
+  '(menu-item "Describe Key or Mouse Operation..." describe-key
 	      ;; Users typically don't identify keys and menu items...
 	      :help "Display documentation of command bound to a \
-key (or menu-item)"))
-(define-key menu-bar-describe-menu [describe-key]
-  '(menu-item "What's This? " describe-key
-	      ;; Users typically don't identify keys and menu items...
-	      :help "Display documentation of command bound to a \
-key (or menu-item)"))
+key, a click, or a menu-item"))
 (define-key menu-bar-describe-menu [describe-mode]
   '(menu-item "Describe Buffer Modes" describe-mode
 	      :help "Describe this buffer's major and minor mode"))