;;; 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
;; 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,
"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
(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
(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'."
(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]
(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)
'(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]
'("--"))
(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]
'("--"))
'(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
(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"))
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]
'("--"))
'(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."
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.