aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2000-09-07 17:14:55 +0000
committerEli Zaretskii2000-09-07 17:14:55 +0000
commit0a1f9f1d9ef3fc2f300255ef2d73f51faff767ee (patch)
tree65294f2f6b89913cb387d77b6b82fe4012a75d0e
parent65606f5ea1de3bea4e6d417e0fbb0be6fd847ba9 (diff)
downloademacs-0a1f9f1d9ef3fc2f300255ef2d73f51faff767ee.tar.gz
emacs-0a1f9f1d9ef3fc2f300255ef2d73f51faff767ee.zip
(read-mail-item-name): New function.
(menu-bar-tools-menu): Use it to compute and display the package used to read email. (menu-bar-tools-menu): Fix typo in GUD's help string.
-rw-r--r--lisp/menu-bar.el21
1 files changed, 15 insertions, 6 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 538a12db875..744ff2a5513 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -639,6 +639,13 @@ Do the same for the keys of the same name."
639 639
640;; The "Tools" menu items 640;; The "Tools" menu items
641 641
642(defun read-mail-item-name ()
643 (let* ((known-rmail-commands '((rmail . "RMAIL")
644 (mh-rmail . "MH")
645 (gnus . "Gnus")))
646 (known (assq read-mail-command known-rmail-commands)))
647 (if known (cdr known) (symbol-name read-mail-command))))
648
642(defvar menu-bar-games-menu (make-sparse-keymap "Games")) 649(defvar menu-bar-games-menu (make-sparse-keymap "Games"))
643 650
644(define-key menu-bar-tools-menu [games] 651(define-key menu-bar-tools-menu [games]
@@ -693,12 +700,14 @@ Do the same for the keys of the same name."
693 '(menu-item "Send Mail" compose-mail 700 '(menu-item "Send Mail" compose-mail
694 :help "Send a mail message")) 701 :help "Send a mail message"))
695(define-key menu-bar-tools-menu [rmail] 702(define-key menu-bar-tools-menu [rmail]
696 '(menu-item "Read Mail" (lambda () 703 (list
697 (interactive) 704 'menu-item `(format "Read Mail (with %s)" (read-mail-item-name))
698 (call-interactively read-mail-command)) 705 (lambda ()
699 :help "Read your mail and reply to it")) 706 (interactive)
707 (call-interactively read-mail-command))
708 :help "Read your mail and reply to it"))
700(define-key menu-bar-tools-menu [gnus] 709(define-key menu-bar-tools-menu [gnus]
701 '(menu-item "Read Net News" gnus 710 '(menu-item "Read Net News (Gnus)" gnus
702 :help "Read network news groups")) 711 :help "Read network news groups"))
703 712
704(define-key menu-bar-tools-menu [separator-vc] 713(define-key menu-bar-tools-menu [separator-vc]
@@ -739,7 +748,7 @@ Do the same for the keys of the same name."
739 748
740(define-key menu-bar-tools-menu [gdb] 749(define-key menu-bar-tools-menu [gdb]
741 '(menu-item "Debugger (GUD)..." gdb 750 '(menu-item "Debugger (GUD)..." gdb
742 :help "Debug a program from withing Emacs")) 751 :help "Debug a program from within Emacs"))
743(define-key menu-bar-tools-menu [shell-on-region] 752(define-key menu-bar-tools-menu [shell-on-region]
744 '(menu-item "Shell Command on Region..." shell-command-on-region 753 '(menu-item "Shell Command on Region..." shell-command-on-region
745 :enable mark-active 754 :enable mark-active