changeset 31471:84f6fc78ec6d

(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.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 07 Sep 2000 17:14:55 +0000
parents 2e399023961d
children 2cf699b8eb1c
files lisp/menu-bar.el
diffstat 1 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/menu-bar.el	Thu Sep 07 17:12:48 2000 +0000
+++ b/lisp/menu-bar.el	Thu Sep 07 17:14:55 2000 +0000
@@ -639,6 +639,13 @@
 
 ;; The "Tools" menu items
 
+(defun read-mail-item-name ()
+  (let* ((known-rmail-commands '((rmail . "RMAIL")
+				 (mh-rmail . "MH")
+				 (gnus . "Gnus")))
+	 (known (assq read-mail-command known-rmail-commands)))
+    (if known (cdr known) (symbol-name read-mail-command))))
+
 (defvar menu-bar-games-menu (make-sparse-keymap "Games"))
 
 (define-key menu-bar-tools-menu [games]
@@ -693,12 +700,14 @@
   '(menu-item "Send Mail" compose-mail
 	      :help "Send a mail message"))
 (define-key menu-bar-tools-menu [rmail]
-  '(menu-item "Read Mail" (lambda ()
-			    (interactive)
-			    (call-interactively read-mail-command))
-	      :help "Read your mail and reply to it"))
+  (list
+   'menu-item `(format "Read Mail (with %s)" (read-mail-item-name))
+   (lambda ()
+     (interactive)
+     (call-interactively read-mail-command))
+   :help "Read your mail and reply to it"))
 (define-key menu-bar-tools-menu [gnus]
-  '(menu-item "Read Net News" gnus
+  '(menu-item "Read Net News (Gnus)" gnus
 	      :help "Read network news groups"))
 
 (define-key menu-bar-tools-menu [separator-vc]
@@ -739,7 +748,7 @@
 
 (define-key menu-bar-tools-menu [gdb]
   '(menu-item "Debugger (GUD)..." gdb
-	      :help "Debug a program from withing Emacs"))
+	      :help "Debug a program from within Emacs"))
 (define-key menu-bar-tools-menu [shell-on-region]
   '(menu-item "Shell Command on Region..." shell-command-on-region
 	      :enable mark-active