]> code.delx.au - gnu-emacs/blobdiff - lisp/menu-bar.el
*** empty log message ***
[gnu-emacs] / lisp / menu-bar.el
index 90c26fcd7105f79f17b66fe819227df2f6796b90..fd77066f0b04f8699a9923c18ffdb18074493157 100644 (file)
@@ -1,6 +1,6 @@
 ;;; menu-bar.el --- define a default menu bar.
 
-;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1995, 2000 Free Software Foundation, Inc.
 
 ;; Author: RMS
 ;; Maintainer: FSF
@@ -326,12 +326,14 @@ A large number or nil slows down menu responsiveness."
 (define-key menu-bar-goto-menu [next-tag-otherw]
   '(menu-item "Next Tag in Other Window"
              (function (lambda () (find-tag-other-window nil t)))
-             :enable (not (ring-empty-p tags-location-ring))
+             :enable (and (boundp 'tags-location-ring)
+                          (not (ring-empty-p tags-location-ring)))
              :help "Find next function/variable matching last tag name in another window"))
 (define-key menu-bar-goto-menu [next-tag]
   '(menu-item "Find Next Tag"
              (function (lambda () (find-tag nil t)))
-             :enable (not (ring-empty-p tags-location-ring))
+             :enable (and (boundp 'tags-location-ring)
+                          (not (ring-empty-p tags-location-ring)))
              :help "Find next function/variable matching last tag name"))
 (define-key menu-bar-goto-menu [find-tag-otherw]
   '(menu-item "Find Tag in Other Window..." find-tag-other-window
@@ -505,8 +507,8 @@ Do the same for the keys of the same name."
        (interactive)
        (if ,(if body `(progn . ,body)
              `(setq ,variable (not ,variable)))
-          (message ,message "enabled")
-        (message ,message "disabled")))
+          (message ,message "enabled")
+        (message ,message "disabled")))
      '(menu-item ,doc ,name
                 :help ,help
                  :button (:toggle . (and (boundp ',variable) ,variable)))))
@@ -520,7 +522,9 @@ Do the same for the keys of the same name."
   ;; because that makes a bootstrapping problem
   ;; if you need to recompile all the Lisp files using interpreted code.
   (list 'menu-item "Mule (Multilingual Environment)" mule-menu-keymap
-       ':visible 'default-enable-multibyte-characters
+;; Most of the MULE menu actually does make sense in unibyte mode,
+;; e.g. language selection.
+;;;    ':visible 'default-enable-multibyte-characters
        ':help "Default language, encodings, input method"))
 ;(setq menu-bar-final-items (cons 'mule menu-bar-final-items))
 ;(define-key menu-bar-options-menu [preferences]
@@ -528,7 +532,7 @@ Do the same for the keys of the same name."
 ;      :help "Toggle important global options"))
 
 (define-key menu-bar-options-menu [mule-separator]
-  '("------"))
+  '("--"))
 
 (define-key menu-bar-options-menu [debug-on-quit]
   (menu-bar-make-toggle toggle-debug-on-quit debug-on-quit
@@ -577,7 +581,7 @@ Do the same for the keys of the same name."
 (define-key menu-bar-options-menu [truncate-lines]
   (menu-bar-make-toggle
    toggle-truncate-lines truncate-lines
-   "Truncate Long Lines" "Long Line Truncation %s"
+   "Truncate Long Lines in this Buffer" "Long Line Truncation %s"
    "If checked, long lines are truncated on the screen"
    (prog1 (setq truncate-lines (not truncate-lines))
      (set-buffer-modified-p (buffer-modified-p)))))
@@ -650,17 +654,17 @@ Do the same for the keys of the same name."
   '(menu-item "5x5" 5x5
              :help "Fill in all the squares on a 5x5 board"))
 
-(define-key menu-bar-tools-menu [calendar] 
+(define-key menu-bar-tools-menu [calendar]
   '(menu-item "Display Calendar" calendar))
 (define-key menu-bar-tools-menu [speedbar]
   '(menu-item "Display Speedbar" speedbar-frame-mode))
 (define-key menu-bar-tools-menu [directory-search]
   '(menu-item "Directory Search" eudc-tools-menu
              :help "Query directory servers via LDAP, CCSO PH/QI or BBDB"))
-(define-key menu-bar-tools-menu [compose-mail] 
+(define-key menu-bar-tools-menu [compose-mail]
   '(menu-item "Send Mail" compose-mail
              :help "Send a mail message"))
-(define-key menu-bar-tools-menu [rmail] 
+(define-key menu-bar-tools-menu [rmail]
   '(menu-item "Read Mail" read-mail-command
              :help "Read your mail and reply to it"))
 (define-key menu-bar-tools-menu [gnus]
@@ -671,6 +675,9 @@ Do the same for the keys of the same name."
   '("--"))
 
 (defvar vc-menu-map (make-sparse-keymap "Version Control"))
+(define-key menu-bar-tools-menu [pcl-cvs]
+  `(menu-item "PCL-CVS" ,cvs-global-menu
+             :help "Module-level interface to CVS"))
 (define-key menu-bar-tools-menu [vc]
   (list 'menu-item "Version Control" vc-menu-map
        :help "Interface to RCS, CVS, SCCS"))
@@ -734,11 +741,12 @@ Do the same for the keys of the same name."
              :visible default-enable-multibyte-characters
              :help "Keyboard layout for specific input method"))
 (define-key menu-bar-describe-menu [describe-language-environment]
-  '(menu-item "Describe Language Environment" describe-language-environment-map
-             :visible default-enable-multibyte-characters))
+  (list 'menu-item "Describe Language Environment"
+       describe-language-environment-map
+       :help "Show multilingual settings for a specific language"))
 
 (define-key menu-bar-describe-menu [separator-desc-mule]
-  '(menu-item "--" nil :visible default-enable-multibyte-characters))
+  '("--"))
 
 (define-key menu-bar-describe-menu [list-keybindings]
   '(menu-item "List Key Bindings" describe-bindings
@@ -754,7 +762,9 @@ Do the same for the keys of the same name."
              :help "Display documentation of function/command"))
 (define-key menu-bar-describe-menu [describe-key]
   '(menu-item "Describe Key..." describe-key
-             :help "Display documentation of command bound to 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 [apropos-variables]
   '(menu-item "Apropos Variables..." apropos-variable
              :help "List variables whose names match a regexp"))
@@ -773,7 +783,7 @@ Do the same for the keys of the same name."
 (define-key menu-bar-manuals-menu [sep2]
   '("--"))
 (define-key menu-bar-manuals-menu [info]
-  '(menu-item "Browse Manuals with Info" info
+  '(menu-item "Browse Manuals with Info" Info-directory
              :help "Read any of the installed manuals"))
 (define-key menu-bar-manuals-menu [command]
   '(menu-item "Find Command in Manual" Info-goto-emacs-command-node
@@ -813,6 +823,9 @@ Do the same for the keys of the same name."
 (define-key menu-bar-help-menu [report-emacs-bug]
   '(menu-item "Send Bug Report..." report-emacs-bug
              :help "Send e-mail to Emacs maintainers"))
+(define-key menu-bar-help-menu [emacs-manual]
+  '(menu-item "Read the Emacs manual"
+             (lambda () (interactive) (info "emacs"))))
 (define-key menu-bar-help-menu [emacs-problems]
   '(menu-item "Emacs Known Problems" view-emacs-problems))
 (define-key menu-bar-help-menu [emacs-news]
@@ -825,7 +838,7 @@ Do the same for the keys of the same name."
              :help "Learn how to use Emacs"))
 
 (defun kill-this-buffer ()     ; for the menubar
-  "Kills the current buffer."
+  "Kill the current buffer."
   (interactive)
   (kill-buffer (current-buffer)))