Mercurial > emacs
comparison lisp/menu-bar.el @ 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 | c613942bdf43 |
children | 0d9e6ed2718b |
comparison
equal
deleted
inserted
replaced
31470:2e399023961d | 31471:84f6fc78ec6d |
---|---|
637 (global-font-lock-mode))) | 637 (global-font-lock-mode))) |
638 | 638 |
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] |
645 (list 'menu-item "Games" menu-bar-games-menu)) | 652 (list 'menu-item "Games" menu-bar-games-menu)) |
646 | 653 |
691 :help "Query directory servers via LDAP, CCSO PH/QI or BBDB")) | 698 :help "Query directory servers via LDAP, CCSO PH/QI or BBDB")) |
692 (define-key menu-bar-tools-menu [compose-mail] | 699 (define-key menu-bar-tools-menu [compose-mail] |
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] |
705 '("--")) | 714 '("--")) |
706 | 715 |
737 (define-key menu-bar-tools-menu [separator-prog] | 746 (define-key menu-bar-tools-menu [separator-prog] |
738 '("--")) | 747 '("--")) |
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 |
746 :help "Pass marked region to a shell command")) | 755 :help "Pass marked region to a shell command")) |
747 (define-key menu-bar-tools-menu [shell] | 756 (define-key menu-bar-tools-menu [shell] |